I believe that if you just have MAILTO="[EMAIL PROTECTED]" then it will automatically send an email to that user when the CRON job is done.
:-) On 3/20/06, James G. Sack (jim) <[EMAIL PROTECTED]> wrote: > Nestor wrote: > > Well, I guess I am about to start reading how to set an alias because I > > think > > that is the only way I will be able todo what I need to. > > > > cron does seem to be fussy about syntax, and I don't see any reference > to multiple recipients. And not only that but I can't even seem to get a > simple-minded MAILTO to work right now! O-Hmpfffht! > > Maybe I misread the syntax explanation in the man pages or maybe even > cron is broke! > > ==> But (as the perl hackers say), there is always more than one way to > do it.. > > You can put the email operations into a script and have cron call your > script to both send the email notifications, as well as do whatever work > you want to do. > > > crontab -e > ---------- > 01 21 * * * /home/user99/bin/doit.sh > > > in /home/user99/bin/doit.sh > --------------------------- > echo `date` "doit.sh: about to start job:" | > bin/mail -s startjob [EMAIL PROTECTED],[EMAIL PROTECTED] > > > commandline-to-do-the-job > RC="$?" > > echo `date` "doit.sh: job completed with result-code=$?" | > bin/mail -s startjob [EMAIL PROTECTED],[EMAIL PROTECTED] > ------------------------------------------------------------- > > > -- > [email protected] > http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list > -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
