Reese Knowledgebase

How to disable cron from sending email alerts

View Kristian Reese's profile on LinkedIn

If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 90
by: Reese K.
Posted: 05 Feb, 2013
Last updated: 05 Feb, 2013
Views: 2754

How to disable cron based mail alerts

The easiest way to disable cron based email alerts is to append the following to the specified command within the users crontab:

>/dev/null 2>&1


# m h dom mon dow command
59 23 * * * /root/scripts/hotfixes/
>/dev/null 2>&1

CRONDARGS='-m off' in /etc/sysconfig/crond may also be specified to turn off mail completely.  Other postings have also indicated setting the MAILTO="" option in the users crontab also works.

Note that I've seen cases where the qmail queue was so high that even after implementing these measures, it seemed to not work, but that was because the qmail queue was draining.  Once it completely drained, the madness stopped.

This article was:   Helpful | Not Helpful
Also listed in
folder UNIX

Prev   Next
Search for largest files in a file system     EXT3-fs warning Directory index full!