cron problem

From: Holger.VanKoll@SWISSCOM.COM
Date: Mon Apr 14 2003 - 09:20:07 EDT


Hello,

when called from cron, this command only gives me a mail message
containing "Mon Apr 14 15:15:00 DFT 2003". /perflog/iostat is not
created/touched.
That looks like the date-command is executed without the +%d etc.
parameters and no io-redirection is done.

>From the shell, it works. Why?

0,30 * * * * /usr/bin/ksh -c '/usr/bin/iostat -s|grep -p System|grep -v
^$|tail -1|read a a r w; echo `/usr/bin/date "+%d%m%y:%H%M"`:$r:$w
>>/perflog/iostat'

Called from at , it works:
echo '/usr/bin/iostat -s|grep -p System|grep -v ^$|tail -1|read a a r w;
echo `/usr/bin/date "+%d%m%y:%H%M"`:$r:$w >>/perflog/iostat'|at 15:12
This created /perflog/iostat and put the values in.

Regards,

Holger



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:44 EDT