![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IDL job doesn't work from crontab | SharkM | Shell Programming and Scripting | 2 | 02-25-2008 03:30 AM |
| date issue-find prevoius date in a patricular format | bsandeep_80 | UNIX for Advanced & Expert Users | 3 | 11-15-2007 05:42 PM |
| convert mmddyy date format to ccyyddd format?? | Bhups | Shell Programming and Scripting | 2 | 09-27-2006 08:30 PM |
| crontab -e dosent work | dozy | UNIX for Dummies Questions & Answers | 11 | 05-26-2003 02:59 AM |
| OS X / fsck / apps dont work no control panel | maxwell | Filesystems, Disks and Memory | 0 | 08-14-2002 05:03 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
not seeing any code or any error messages, it's hard to tell what the problem is - maybe a $PATH problem ?
|
|
#3
|
|||
|
|||
|
at least u can put crontab -l here
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
I tried both in solaris and AIX . but I could not make it work.
|
|
#7
|
||||
|
||||
|
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. |
||||
| Google The UNIX and Linux Forums |
| Tags |
| solaris |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|