1836102 Members
2436 Online
110089 Solutions
New Discussion

Re: Cron-Output

 
SOLVED
Go to solution
Ralf Buchhold
Regular Advisor

Cron-Output

Hello
when I start some jobs via crontab,
the server sends e-mails to root@......
Can I supress this ?
Thank you Ralf
2 REPLIES 2
Victor Fridyev
Honored Contributor
Solution

Re: Cron-Output

Hi,

If you don't want to receive mail from cron, add at the end of each cron job
1>/dev/null 2>&1
i.g

10 12 * * * /usr/local/bin/job1 1>/dev/null 2>&1

HTH
Entities are not to be multiplied beyond necessity - RTFM
Abdul Rahiman
Esteemed Contributor

Re: Cron-Output

Just an additional comment..
Or you could redirect the output of your cron scripts to a log file as follows,

10 08,20 * * * /usr/local/bin/myscript >> /var/adm/log/sendmail.log 2>&1
No unix, no fun