| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|Help with Crontab|
Using Date Variable
| 3:08 pm on Apr 2, 2007 (gmt 0)|
Hi, Im trying to setup a cron job to download a set of log files on the 1st of every month though I can't seem to get it to work using a date variable. Am currently using:
0 10 1 * * lynx -dump -auth=user:pass http://www.example.com/subdirectory/$(date '+\%d\%m\%Y').zip > /home/user/logfiles/$(date '+\%d\%m
The files im trying to download are in the format:
01 February 2007 01022007.zip
01 March 2007 01032007.zip
01 April 2007 01042007.zip
Can anyone suggest where I might be going wrong?
[edited by: Moff at 3:17 pm (utc) on April 2, 2007]
| 6:50 pm on Apr 2, 2007 (gmt 0)|
Try adding back quote to date varable:
| 11:26 am on Apr 3, 2007 (gmt 0)|
That got it.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2013 all rights reserved