I've been actively tweaking my backup script on an Ubuntu 9.04 Jaunty Jackalope Machine - as it is now, the script uses rsync and cron to backup certain folders several times a day. At the end of the script, I use a set of echo commands to generate log files that would indicate, among other things, whether or not the backup had been executed during a particular time. What's the easiest way to make Jaunty automatically email me the logs just shortly (0-15 minutes) after they have been generated? Would I be able to use the SMTP of my gmail account for this purpose?
|
If your cron job produces any output, it will be sent in an email. Normally, the email will be sent to the owner of the crontab file. For instance, the output of root's cron jobs will be sent to root, so you need to make sure that those emails are forwarded to you. As an alternative, you can specify another recipient in the MAILTO variable in the crontab file. If you do not already have outgoing email set up and working on your Ubuntu box, you will need to do that first. I am not speaking of configuring an email client (formally: mail user agent, MUA), but rather set up an email server (formally: mail transfer agent, MTA) on your system. The server can be configured to be minimal and just forward all email to another email server (e.g., your company or ISP's mail server). |
|||||||||||||
|
