Re: cron problem

From: Jean-Marc Monnez (monnez.jean-marc@AGORA.MSA.FR)
Date: Mon Apr 14 2003 - 11:11:16 EDT


Holger,

AFAIR the % sign is used to redirect input on cron lines.
You should try to escape the % with \%.

Regards

-- JMM

Holger.VanKoll@SWISSCOM.COM a écrit :

> 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

-- JMM

-----------------------------
Jean-Marc MONNEZ
MSA / AGORA / ATD
monnez.jean-marc@agora.msa.fr
-----------------------------





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