On Wed, 2008-07-16 at 11:51 +0100, solarflow99 wrote:
> I wonder what the best way is to receive email notifications from cron
> job scripts? Say I put a script in cron.daily, and I don't want email
> for all the other cron jobs in there, just to see the output the one I
> added.
I've been using a simple Perl script called "mailif". You run your cron
job like this:
0 * * * * /path/to/script 2>&1 | /path/to/mailif -s "Cron output" [EMAIL
PROTECTED]
mailif detects empty output or just a single dot and does not send the
email. It passes all its arguments to /bin/mail.
/Brian/
--
Brian Long | |
. | | | . | | | .
' '
C I S C O
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list