why the date format dont work in crontab

Hi

I tried to put a cron job which pipes the logfile appended to date +%d
but it didnt work .

anyone know how to make this happen

thanks in advance
-prasad

not seeing any code or any error messages, it's hard to tell what the problem is - maybe a $PATH problem ?

at least u can put crontab -l here

sorry about the delay.

this is the crontab entry.

0 17 * * * /home/oracle/bin/move_archlog.ksh > /home/oracle/log/move_archlog.cron.log.`date +%m%d%y` 2>&1

So it is creating logfile name as
move_archlog.cron.log.Sat May 31 17:00:00 PDT 2008
instead of
move_archlog.cron.log.060208

works fine for me on freebsd - what *nix OS you running?

p.s if you're going to use dated logs, it's best to use the universal standard of YYYYMMDD

I tried both in solaris and AIX . but I could not make it work.

Do this.

0 17 * * * /home/oracle/bin/move_archlog.ksh > /home/oracle/log/move_archlog.cron.log.`date +\%m\%d\%y` 2>&1

You may need to escape the %s.

Thanks Jhtrice,

It worked .