November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

How to disable cron based mail alerts

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

Example:

# m h dom mon dow command
59 23 * * * /root/scripts/hotfixes/vzagentdb.sh >/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.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>