[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: root mail - cronjob

"Techgod" <waynes@techgod.net> wrote:
>I have this cronjob running, and everytime it runs, it emails root, to say
>it was successful.  How do I get it to stop sending the email?

Don't send anything to standard output or standard error. Anything the
cron job outputs will be mailed to whatever the MAILTO variable in the
relevant crontab is set to, if anything, otherwise to the owner of the

If you can't control what the cron job outputs, then just put
'>/dev/null 2>&1' after it to throw away any output and error messages.
(If you want to leave the error messages alone just in case, then forget
about the '2>&1'.)

Colin Watson                                     [cjw44@flatline.org.uk]

Reply to: