Disable mail from cron job

Most of the scripts I write include an email that includes status and timing of each command. When these are run via cron, I get a second email from the cronjob. In order to stop this just add this to the top of the cronjob file:


This will stop cron from sending out email and allows for turning back on when you need to debug.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.