![]() |
![]() OCAU News - Wiki - QuickLinks - Pix - Sponsors |
|
|||||||
| Notices |
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#16 | |
|
Member
Join Date: Mar 2002
Location: melbourne
Posts: 761
|
Quote:
/tmp dir is already made. $ ls -Fla /tmp k_
__________________
I'm waiting for the night to fall, when everything is bearable and there in the still, all that you feel is tranquillity - dm |
|
|
|
|
| Join OCAU to remove this ad! |
|
|
#17 |
|
Member
Join Date: Sep 2006
Posts: 707
|
Ok I confirmed cron works...
Implementing everything in its final form fingers crossed ![]() edit: Ok cron is working, but when it finally runs, NOTHING gets downloaded. I also output my wget into a log file and while the log file gets successfully created, it is blank my cron script is: date=`date -I` ; wget -P /volume1/downloads ftp://USER:PASS@SITE.com.au/SITE.com.au_$date.tgz > /tmp/wgetLog If I run the cron script by itself in the shell, it downloads the file perfectly. But when in crontab, it doesn't do anything except make a blank file called wgetLog ![]() I'm sooo close to my solution, just need a bit more help, thanks
__________________
industrialist... philanthropist... bicyclist... Last edited by echelon6; 3rd May 2010 at 3:37 PM. |
|
|
|
|
|
#18 |
|
Member
Join Date: Mar 2002
Location: melbourne
Posts: 761
|
Try this cron script:
Code:
(date=$(/bin/date -I) ; /usr/bin/wget -P /volume1/downloads ftp://USER:PASS@SITE.com.au/SITE.com.au_${date}.tgz > /tmp/wgetLog 2>&1)
k_ ps. I tried a variant of the above and it worked with the following, optimised. Code:
/usr/bin/wget -P /volume1/downloads ftp://USER:PASS@SITE.com.au/SITE.com.au_$(/bin/date -I).tgz > /tmp/wgetLog 2>&1
__________________
I'm waiting for the night to fall, when everything is bearable and there in the still, all that you feel is tranquillity - dm Last edited by k371n; 4th May 2010 at 11:45 AM. |
|
|
|
|
|
#20 |
|
Whammy!
Join Date: May 2003
Location: Melbourne
Posts: 3,945
|
Don't forget to specify the full path to date not just wget
__________________
Administrator: Apple Desktop Hardware/Software, Graphics and Programming, Digital Art, iOS Devices, For Sale (PC and Non-PC), Price Check and What/Where Should I Buy? mercury: 11" Macbook Air, i5, 4Gb RAM, 128Gb SSD lunchbox: Mac mini, i5 Dual Core, 4Gb RAM, 500Gb HDD |
|
|
|
|
|
#21 |
|
Member
Join Date: Sep 2006
Posts: 707
|
Yep bingo that did the trick
For some reason, commands in cron need to specify the full path of wget and date and other functions. once I did this, everything worked sweet Thanks EVERYONE for all the help these last few days
__________________
industrialist... philanthropist... bicyclist... |
|
|
|
![]() |
| Bookmarks |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|