-   Linux - Software (
-   -   Limiting cron mail (

i_nomad 01-12-2009 05:11 AM

Limiting cron mail
I have a cronjob run by root. This is sending a mail to root which points to
The cronjob also sends confirmation of the job to which I want.

Is there a way I can prevent the default cron mail send and just keep below. I dont want to prevent cron mail being received.

0 11 * * * /root/ | mail -s "`hostname` backup run"

Can someone assist please.


billymayday 01-12-2009 05:34 AM



0 11 * * * /root/ | mail -s "`hostname` backup run" > /dev/null 2>&1
do the trick?

i_nomad 01-12-2009 05:42 AM


I did try that earlier, > /dev/null 2>&1 and that does not do the job. I still receive 2 emails and from root that also points to

The root cron mail has in subject:
Cron <root@xxx> /root/ | mail -s "`hostname` Backup"

and in the body:
Null message body; hope that's ok

I dont want this...


billymayday 01-12-2009 06:00 AM

You could try


at the top of your crontab

i_nomad 01-12-2009 06:15 AM

Cheers mate that has done the trick 8-)

All times are GMT -5. The time now is 12:27 AM.