how to avoid receiving an email every time a cron task is executed

How can you disable the automatic sending of mails to the sysadmin in linux/unix each time a task is run in the crontab list?

I found the solution thanks to a very useful explanation between adding:



>/dev/null &2>1

to a cron task.

Both of them avoid that an email is sent everytime a task is completed. But in the second case it will also avoid sending error mails.

Read the details here

The mails are sent if you don’t use either of those two at the end of the cron task. I didn’t know it and was receiving tons of alerts, since I have a cron every two minutes!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s