Kevin D. Kinsey, DaleCo, S.P.
kdk at daleco.biz
Wed Nov 26 09:47:53 PST 2003
stuart.gibson at bridgeman.co.uk wrote:
>I have a number of scripts that run every night using a crontab. In my
>crontab file I'm using the MAILTO flag to get cron to email me every
>time it runs which results in a lot of emails.
>Is there any way of instructing cron to only email me if the cron job
Redirect stderror to /dev/null:
/bin/sh /home/me/myscript > /dev/null
And this one won't mail you, whether it errors
/bin/sh /home/me/myscript > /dev/null 2>&1
More information about the freebsd-questions