To stop cron jobs from sending an email after each run, add this to the end of your cron command:

> /dev/null 2>&1

Example:

/usr/bin/php /home/user/public_html/script.php > /dev/null 2>&1

The cron job will still run normally, but the output and error messages will be discarded instead of being emailed after every run.

This is useful when a cron job runs often and you do not need an email notification each time it completes.

Was this answer helpful? 430 Users Found This Useful (438 Votes)