| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Help with Crontab|
Using Date Variable
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]
Try adding back quote to date varable:
That got it.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved