From: cnurb on
Can someone tell me why the following command works from a ksh
prompt
but not when the command is inside a crontab ?

Thanks,
Carl

cp /export/home/bb/todo /export/home/bb/todo-archive/todo_`date '+%m%d
%y'`

Above works find and creates the file :

/export/home/bb/todo-archive/todo_090309

However, when I put the cp command above my crontab:

49 13 * * 1-5 cp /export/home/bb/todo /export/home/bb/todo-archive/
todo_`date '+%m%d%y'`

I get /export/home/bb/todo-archive/ todo_ .





From: Bill Marcum on
On 2009-09-03, cnurb <cnurbw(a)yahoo.com> wrote:
> Can someone tell me why the following command works from a ksh
> prompt
> but not when the command is inside a crontab ?
>
> Thanks,
> Carl
>
> cp /export/home/bb/todo /export/home/bb/todo-archive/todo_`date '+%m%d
> %y'`
>
It's the % signs. Read 'man crontab'.

From: David W. Hodgins on
On Thu, 03 Sep 2009 10:37:02 -0400, Bill Marcum <marcumbill(a)bellsouth.net> wrote:

> It's the % signs. Read 'man crontab'.

More specifically, "man 5 crontab".

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)