Disable Mail Notification from Cron
How to stop receiving email alert from cron on any unix / linux environment
Have you ever use your Raspberry Pi terminal session and you see following message randomly?
You have new mail in /var/mail/pi
Maybe you’re wondering who’s sending these emails.
To know that, you can type mail
to check your inbox.
If you see several messages like following line, then it’s caused by cron
job.
To stop cron
sending you emails, you can just add >/dev/null 2>&1
to the end of your cron
job.
To do that, open your cron jobs.
Then append >/dev/null 2>&1
for each job.
Here is an example of my cron jobs.
Afther that, save the crontab file.
Then you’ll never receive mail notification again from cron
.