Disable crontab mail alerts

To prevent mail messages piling up from your crontab commands you add the following at the end of your crontab line:

>/dev/null 2>&1


&> /dev/null

So for example crontab entry:

@weekly /usr/local/bin/gravity.sh

will become:

@weekly /usr/local/bin/gravity.sh >/dev/null 2>&1

Alternative would be using MAILTO=”” variable at the start of your crontab file.

Please edit crontab file with command crontab -e and add at the top of the file:


Save and close the file.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.