Turn Off Cron Emails


#1

How can I turn off the Cron emails? I can make my script email me if something goes wrong… That’s what I care about. I’ve been getting tons of mail that goes directly to the trash (made a rule). Just a waste.


#2

Just redirect stdout / stderr to the bit bucket so that the emails aren’t sent at all. Something like this should work. See crontab(5) for more information (man 5 crontab).

Basically, you want something like this:

          • /your/cron/job >/dev/null 2>&1

If you want to receive stderr, but not stdout, just do:

          • /your/cron/job >/dev/null

A quick and dirty way to accomplish what you’re trying to do would be to put:
MAILTO=""