How to stop cronjobs from sending emails....
Hello i was receiving emails for all my cronjobs , then i added MAILTO="" at cronjob list with crontab -e , now i receive only 1 email ....
Subject: Cron <www-data@b0x> [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh From: root <root> To: www-data <www-data> how can i stop these emails ?? |
Make output go to the bit bucket using '/usr/share/awstats/tools/update.sh > /dev/null 2>&1' but note you then won't be alerted on errors either.
|
before i add MAILTO="" i tried to put this at every line > /dev/null (only this) but it didn't work... my problem is that i can't find the line that sends email at the crontab.... very strange...it must be inside some other script
|
Usually a cronjob with a recognizable name like "awstats" somewhere in /etc like /etc/cron.d/awstats?..
|
thanks mod , if i access /etc/cron.d/awstats with nano i can see these 2 lines.... so i have to edit the file and add the > /dev/null ?
*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh # Generate static reports: 10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh |
Quote:
Code:
*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh > /dev/null 2>&1 |
Quote:
|
All times are GMT -5. The time now is 09:38 AM. |