DelphiFAQ Home Search:

How to disable notification emails of cron jobs

 

comments3 comments. Current rating: 5 stars (3 votes). Leave comments and/ or rate it.

Question:

I have a couple of jobs scheduled using cron. Some run every hour and I am tired of seeing the same notification emails every hour. How can I disable that?

Answer:

Indeed by default cron jobs sends a email to the user account executing the cronjob. If you don't like that simply redirect your job's stdout and stderr to null
You can do that by appending the following to your command:

>/dev/null 2>&1


Content-type: text/html

Comments:

2008-12-05, 00:24:36
anonymous from United States  
rating
this was exactly what i was looking for, and it was the first google result. thanks!
2009-09-13, 19:13:18
anonymous  
rating
You can add
MAILTO=''
at beginning of your crontab files, and you'll never receive such email.

Or, you can try some online cron job such as http://www.onlinecronjob.com http://www.setcronjob.com/ etc
2012-10-11, 17:41:28
anonymous from China  
rating
You can have better email control if you use cron job service like http://www.easycron.com.

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: