Silence crontab

Sometimes you don’t want to get any notifications from your cronjob, but somewhere in the code someone echos something and so you get an email each time. That could be very annoying. The following snipped will help you to immobilize the cron.

*/5 * * * * /var/wwww/whatever.php > /dev/null 2>&1

The important part isĀ > /dev/null 2>&1. This throws every output into a black hole.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

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