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}/bigtask.sh > /dev/null 2>&1

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

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.