How to disable the email notification by crond?

crond sends email notifications automatically. However, these emails are not needed. How to disabled it?

asked May 1, 2014 by Eric Z Ma (44,280 points)

1 Answer

Best answer

If your command does not anything printed to STDOUT or STDERR, there is not emails send. You can redirect 2 and 1 to /dev/null at the end of your command.

You can also set the MAILTO variable to empty by add this line to your crontab -e:

answered May 1, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost