Hi,
Please take a look at the following cron task:
* * * * * root ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' > /dev/null || logger get executed.
It bewilders me that it is not doing what I want. Here is the syslog
when it is run:
Mar 15 13:15:02 cxmr /USR/SBIN/CRON[22779]: (root) CMD (ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' > /dev/null || logger get executed.)
Mar 15 13:15:02 cxmr /USR/SBIN/CRON[22780]: (root) CMD ...
I.e., I want to execute a cron task if I'm not burning CD/DVD. But the
actual command never get executed, even when I'm not burning CD/DVD. If I
redo the command from the command line, it is fine:
$ (ps -eaf | grep -E 'cdrecord.* -[dts]ao |cdrdao *write|growisofs.*speed=' > /dev/null || logger get executed.)
$ tail /var/log/syslog
Mar 15 13:16:27 cxmr tong: get executed.
So, what is the problem?
PS. I'm sure the PATH is setup properly in my cron, so cron can find ps &
grep.
Thanks