Disabling e-mail notifications from cron jobs
Learn how to stop e-mail notifications from cron jobs.

This article explains how to prevent cron jobs from sending e-mail notifications.

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

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

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

Дали Ви помогна овој одговор? 0 Корисниците го најдоа ова како корисно (0 Гласови)

Powered by WHMCompleteSolution