Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
NickTheGreek

How to disable e-mail notifications from cron jobs

Recommended Posts

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.

https://www.a2hosting.com/kb/developer-corner/linux/disabling-e-mail-notifications-from-cron-jobs

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×