4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Help with cron jobs
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Spuddy
Junior WebHelper
Junior WebHelper


Joined: 25 Jun 2006
Posts: 5

PostPosted: Sun Jun 25, 2006 4:21 pm (11 years, 4 months ago) Reply with QuoteBack to Top

Hi i am hoping someone can help me with this i am trying to set up a cron using cpanel to log into an ftp server download a file then write to a file on my site but cant seem to get it to work i know it is possible because we used to have it on our old site just cant remember how.

any help would be much appreciated.

this is what i was trying to use - ftp://***.***.***.**/Desktop/coDUOTDM1pure/uo/tdm1june.log > publi_html/vspstats/codtdm1/tdm1june.log
OfflineView User's ProfileFind all posts by SpuddySend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Mon Jun 26, 2006 12:18 pm (11 years, 4 months ago) Reply with QuoteBack to Top

Here's what you should use as the cron command:

Code:
wget -O ~/public_html/vpstats/codtdm1/tdm1june.log --ftp-user=user --ftp-password=password ftp://xxx.xxx.xxx.xxx/Desktop/coDUOTDM1pure/uo/tdm1june.log


Obviously, if this is a public FTP server you can leave out the username/password options.

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Spuddy
Junior WebHelper
Junior WebHelper


Joined: 25 Jun 2006
Posts: 5

PostPosted: Mon Jun 26, 2006 6:53 pm (11 years, 4 months ago) Reply with QuoteBack to Top

thanks a lot for that but i still get an error with that as well Sad

/bin/sh: /usr/bin/wget: Permission denied

does not try to log into my ftp server so guessing must be a prob at the website end.

any ideas ?

if it will help to solve the problem i can be contacted on msn = cantfindmypotato@hotmail.co.uk
OfflineView User's ProfileFind all posts by SpuddySend Personal Message
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Mon Jun 26, 2006 10:21 pm (11 years, 4 months ago) Reply with QuoteBack to Top

That indicates that your host has restricted which commands you can run, and you will need to contact them about it.

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Spuddy
Junior WebHelper
Junior WebHelper


Joined: 25 Jun 2006
Posts: 5

PostPosted: Tue Jul 04, 2006 1:09 pm (11 years, 3 months ago) Reply with QuoteBack to Top

ok i have changed website hosts for other reasons but still having problems with cron.

i have checked on our old site where it was working and so changed it too my settings and still does not work can you take a look and see if can see whats wrong.

Code:
php -c cfg-default.php -l cod -p savestate 1 ftp://**.**.**.**/Deskstop/CoDUOTDM1/uo/tdm1july.log


error i get now is = /bin/sh: line 1: hp: command not found

Thanks again for your help


Last edited by Spuddy on Tue Jul 04, 2006 4:37 pm, edited 1 time in total
OfflineView User's ProfileFind all posts by SpuddySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jul 04, 2006 3:14 pm (11 years, 3 months ago) Reply with QuoteBack to Top

What is this supposed to do? I've never heard of the "hp" command...

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Spuddy
Junior WebHelper
Junior WebHelper


Joined: 25 Jun 2006
Posts: 5

PostPosted: Tue Jul 04, 2006 4:37 pm (11 years, 3 months ago) Reply with QuoteBack to Top

sorry missed out the p when i coppied it :s
OfflineView User's ProfileFind all posts by SpuddySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jul 04, 2006 5:07 pm (11 years, 3 months ago) Reply with QuoteBack to Top

Ah OK, now I look at it (and see "default.php") it does seem rather obvious - I should have spotted it! So did that solve your problem?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Spuddy
Junior WebHelper
Junior WebHelper


Joined: 25 Jun 2006
Posts: 5

PostPosted: Tue Jul 04, 2006 5:18 pm (11 years, 3 months ago) Reply with QuoteBack to Top

no now i get the error = no input file specified
OfflineView User's ProfileFind all posts by SpuddySend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.059261 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme