InvoiceBerry Blog

Our thoughts & tips on small businesses, freelancers and sole traders

How to disable the mail alert when running cron jobs (crontab)

Written by on August 22, 2011

By default you will always receive an email to your local email account whenever a cron job either does not work or wants to output something.
To deactivate this you have to do the following.

First open your cron jobs…
$ crontab -e

…and then either put:
>/dev/null 2>&1

&> /dev/null

…at the end of the line of the command.

Your cron job will then look like:
* * * * * /path/to/my/ >/dev/null 2>&1

* * * * * /path/to/my/ &> /dev/null

Save the file. Done.

Subscribe now

Get our weekly digest into your inbox!

Sign up to our weekly newsletter to receive the best freelancing and small business articles on InvoiceBerry.

Ready to start invoicing your clients with InvoiceBerry?

Sign up to our free trial account. No credit card required.

Sign Up Now
Don't leave us yet!

Subscribe to our weekly digest!

Sign up to our newsletter to receive our weekly email digest every Friday morning and read about the best freelancing and small business articles on InvoiceBerry.

Read previous post:
We’re featured in entrepreneur country!

The managing director and founder of Invoiceberry was interviewed by entrepreneur country and we are featured in this month's edition...

We use cookies to give you a better experience. Check out our privacy policy for more information.