Why is cron mailing me program output even though I've redirected to /dev/null?
- by Server Fault
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.