1832453 Members
3709 Online
110042 Solutions
New Discussion

Cron mail

 
SOLVED
Go to solution
Kevin Daines
Advisor

Cron mail

I have recently had to set up a cron job to run every half an hour, this is generating many mails.

Is there anything I can set to stop this particular cron job sending a mail?

Kind regards
2 REPLIES 2
Nicolas Dumeige
Esteemed Contributor
Solution

Re: Cron mail

Hello,

cron wil send you a mail only if the script produced output.

Using redirection, cron will be silent.

* * * * /my/script 1>my_log 2>&1

Cheers

Nicolas
All different, all Unix
Robert-Jan Goossens
Honored Contributor

Re: Cron mail

Hi,

send the output of the crontab entry to /dev/null

example below.

00 20 * * 6 /usr/local/nsr/bin/rt n c >/dev/null 2>&1

Robert-Jan