How to get rid of cron warnings

Posted by | Posted in Bash, Code, Command-Line, Cron, Linux, OS X, Server, Ubuntu | Posted on 31-01-2011

If a cron job executes with unmanaged warnings for data, you’ll generate LOTS of emails to your account. Here is an easy way to redirect all that extraneous data.

Just add “>> /dev/null 2>$1″ to the end of each of your cron jobs.

 
0,10,20,30,40,50 * * * * /path/to/script >> /dev/null 2>&1

Comments are closed.

Join the mailing list

Check your email and confirm the subscription