Register
It is currently Mon Dec 22, 2014 5:00 pm

Email on completion of script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue Jul 21, 2009 2:01 pm   

Joined: Fri May 16, 2008 4:58 am
Posts: 94
I've mad a simple ftp backup script which i'll probably end up executing through cron, what i'd like to do is have it email me the output of it ie when I execute it via the cli it outputs

local: blah remote: blah
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 File receive OK.
180231 bytes sent in 0.23 secs (767.2 kB/s)
221 Goodbye.
.Remote FTP transfer completed

thanks


Top
 Profile  
 PostPosted: Thu Jul 23, 2009 12:25 pm   
Moderator
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 242
Hi Brian,

Do you have a mail server setup on the system? If so, you can usually do something like this:

Code:
sh ./backupscript.sh |mail user@domain.com -s 'backup script output'


Hope this helps!


Top
 Profile YIM  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP