Home » Code, Informational, Installing, Resources, Scripts, Server, cron, server-side

How to stop emails to your Inbox for cron job entries

12 May 2010 No Comment

One of the more annoying aspects of using cron jobs is the email notification to your Inbox everytime the job runs. If you have an hourly cron job running, you will receive 24 emails defining the status of the run job everyday. The downside of disabling the output and error log is that you will not know what is going on with your jobs. With that said, add the following statement to the end of your crontab entry to stop those bloody emails.

View and download the code at my Code bin: http://code.rbucky.com/7

If you prefer to change the email address that is sent (by default it is sent to the local root account), add the following code to the top of your crontab.

MAILTO=""

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.