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 email notifications, put >/dev/null 2>&1 to the cron job command. This redirects all cron job output to the /dev/null device. The following cron job, for example, does not send e-mail notifications:

15 * * * Sun     ${HOME}/bigtask.sh > /dev/null 2>&1

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

Was this answer helpful?

Related Articles

How to determine high disk usage locations

This article describes how to determine where your account is using the most disk space....

How to manage the inode count

This article defines an inode count, discusses how to calculate it for your account, and how to...

How to monitor resource usage

This article describes how to monitor resource usage using the top and atop commands. Method 1:...

How to use cURL

This article describes how to use the cURL program to transfer files from the command line. When...

How to use the shebang

This article defines the shebang and how to utilize it to ensure that your script files execute...