Ensure there is no ouput to stdout when a cron job runs

Just add the following to the end of any command,

> /dev/null 2>&1

For example, you may run some command that has output and as a result, cron emails you just because there is output. Appending that redirection, there is no output.

0 0 * * * /usr/bin/somecommand > /dev/null 2>&1

If somecommand has output, no email will be sent.

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.