Cron: E-Mail me only when necessary
I have written a shell script that I have Cron execute every hour. Cron e-mails me every hour when the script is executed. I would prefer it to e-mail me only when my script returns a non-zero exit status.
How should I go about doing this? TIA, Robert |
put >/dev/null behind the command
|
Ah, so simple.
Thanks! |
OK, so my crontab looks like this:
# DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.16401 installed on Fri May 31 09:49:31 2002) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) SHELL=/bin/tcsh 0 5 * * * /root/Cron/backup > /dev/null 5 * * * * /root/Cron/earlybird > /dev/null but I'm still getting e-mails every hour. Did I do it right? -R |
All times are GMT -5. The time now is 03:46 PM. |