April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

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>