1755670 Members
4870 Online
108837 Solutions
New Discussion

flagging script failures

 
SOLVED
Go to solution
Bill Thorsteinson
Honored Contributor

Re: flagging script failures

By default cron will send the stderr and stdout to the
user if they are no empty at the end of the job.

If you make sure that errors result in output on stderr and
don't redirect it to /dev/null the error status will be
automatically mailed.

The trick is to get it to someone usefull. I use
procmail to look at the subject header and direct it
accordingly. The redirects
are to alaises that contain
one or more people depending on the script.