http://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/
Cron Job Prevent the sending of errors and output
To prevent the sending of errors and output, add any one of the following at the end of the line for each cron job to redirect output to /dev/null.
>/dev/null 2>&1.
OR
&> /dev/null
Cron Job Example
Edit/Open your cron jobs, enter:$ crontab -e
Append string >/dev/null 2>&1 to stop mail alert:0 1 5 10 * /path/to/script.sh >/dev/null 2>&1
OR0 1 5 10 * /path/to/script.sh &> /dev/null
Save and close the file. Restart the crond:# /etc/init.d/crond restart
MAILTO variable
As pointed out by Anand Sharma, you can set MAILTO="" variable at the start of your crontab file. This will also disable email. Edit/Open your cron jobs$ crontab -e
At the top of the file, enter:MAILTO=""
Save and close the file.
'Unix/Linux' 카테고리의 다른 글
How to clear bash history compeletly? (0) | 2013.05.01 |
---|---|
What command to show Centos version running (0) | 2013.04.17 |
(sh) 요일별 로그 파일 생성 (0) | 2013.03.22 |
(Ubuntu) Set default language to English (0) | 2013.03.07 |
Take Control of your Linux | sudoers file: How to with Examples (0) | 2013.02.26 |