When an cron job runs, cron daemon will send an email to the user account that executing the cronjob. The notification or result mail messages normally contains output result or respond of the task or command executed by the cron job.
Administrator or cron jobs schedulers who do not want to receive any email every time cron jobs are run can easily turn off and disable the email sending by crontab. To disable email delivery on execution of cron jobs, just append the following command to the end of the cron job line in crontab. Each cron job that does not need email sending will have to be added.
> /dev/null 2>&1
For example,
30 8 * * * command > /dev/null 2>&1
Tip: To edit cron jobs, type “crontab -e” in most system.
Restart cron jobs deamon when done.
No comments:
Post a Comment