Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list of cronjobs where some executes daily and others execute very 15 minutes. I do want to receive an email for the ones executed daily, but wants email disabled for the ones executing every 15 minutes(or maybe receive a daily email), is there a way to do this in crontab?

share|improve this question
up vote 5 down vote accepted

To stop the output from being e-Mailed for a specific cron entry, redirect the output for those cron to /dev/null. Suffix your cron entry with this to redirect both STDOUT and STDERR:

> /dev/null 2>&1

While you can redirect different types of output different ways, for more advanced handling such as digests, you will need to script it.

As a side note, important notifications shouldn't be e-Mailed. Use central logging (syslog) or monitoring. (nagios)

share|improve this answer
To script a digest just change > /dev/null 2>&1 to >> /var/log/{filename} 2>>&1 and add a cron entry to send and truncate that file on a schedule. – Chris Nava May 26 '10 at 19:37
Good idea on that. Really, just cat would be enough as a cron entry. – Warner May 26 '10 at 19:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.