Getting rid of crontab emails

25 Nov, 2009

cron
Question: How do I stop crontab from sending me emails after a cron job finishes?

Answer: In Linux the default setting for crontab is to send an email to the owner after a cron job finishes. An easy way to change this is to reroute those emails into nothingness, which in Linux is a directory called /dev/null.

Just append a pipe to it at the end of your command like so:

/usr/bin/command >/dev/null 2>&1

That will do the trick. You can enter it from the command line or through a control panel, if it supports cron jobs.

Photo: Flickr

Share
Categories : VPS & Dedicated, Web Hosting , , , ,
Tag: , , , ,

Comments are closed.