Knowledge Base

How to disable e-mail notifications from cron jobs

This article demonstrates how to stop receiving e-mail notifications from cron jobs.

By default, when a cron job is run, cron sends e-mail notifications to the user account. To disable e-mail notifications, append >/dev/null 2>&1 to the command in the cron job. This redirects all output from the cron job to the /dev/null device. For example, the following cron job does not send e-mail notifications:

15 * * * Sun     /home/username/bigtask.sh > /dev/null 2>&1

To resume receiving e-mail notifications from cron jobs, simply remove >/dev/null 2>&1 from the command.