Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

cron email

  Date: Nov 24    Category: Unix / Linux / Ubuntu    Views: 369

I keep getting email from cron whenever a job runs from the root's
crontab (because the job has console output). From the /etc/crontab
file I commented out the line with the Mail-To statement, and it
still keeps on coming. I'm assuming that there may be a separate
crontab file for root or some other configuration file that causes
root to be mailed?



1 Answer Found

Answer #1    Answered On: Nov 24    

It's actually automatic. If you don't want a job's statistics to be
emailed to you, redirect the output to /dev/null. i.e. [cron stuff]
/bin/ls &>/dev/null

You can do this with all the commands obviously, but I don't think you
can turn off the emailing option.

Didn't find what you were looking for? Find more on cron email Or get search suggestion and latest updates.