Why is cron mailing me program output even though I've redirected to /dev/null?

Posted by Server Fault on Server Fault See other posts from Server Fault or by Server Fault
Published on 2013-11-01T13:44:42Z Indexed on 2013/11/01 15:59 UTC
Read the original article Hit count: 245

Filed under:
|

I'm trying to restart a system process through cron and getting emailed the startup output of the process. I thought redirecting STDOUT and SDTERR to /dev/null would "silence" the output but alas, this has not work. How can I get cron to silently restart this service? crontab entry:

0 6 * * * service sympa stop &>/dev/null; service sympa start &> /dev/null

sample output from restart email:

 Stopping Sympa bounce manager bounced
   ...done.
 * Stopping Sympa task manager task_manager
   ...done.
 * Stopping Sympa mailing list archive manager archived
   ...done.
 * Stopping Sympa mailing list manager sympa
   ...done.
 ... waiting Prototype mismatch: sub Lock::LOCK_SH () vs none at /home/sympa/bin/Lock.pm line 38.
Constant subroutine LOCK_SH redefined at /home/sympa/bin/Lock.pm line 38.
Prototype mismatch: sub Lock::LOCK_EX () vs none at /home/sympa/bin/Lock.pm line 39.
Constant subroutine LOCK_EX redefined at /home/sympa/bin/Lock.pm line 39.
Prototype mismatch: sub Lock::LOCK_NB () vs none at /home/sympa/bin/Lock.pm line 40.
Constant subroutine LOCK_NB redefined at /home/sympa/bin/Lock.pm line 40.

© Server Fault or respective owner

Related posts about linux

Related posts about cron