Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
CRON Jobs - Need help knowing what is happening
Old 07-02-2006, 02:25 PM CRON Jobs - Need help knowing what is happening
Webmaster Talker

Posts: 626
Trades: 0
I have just setup a cron job for the first time. It took some doing but I have it working in that it updates my rates now automatically. This is awesome. Here is how I am doing it:

1. I have a cron job run the following command: wget http://www.mysite.com/scripts/upd_rates.php

The email that I receive confirming is says that everything was okay and the file was downloaded. NOW, I don't really know what the command wget does. Does it actually download a file to the server? I don't really need to download it I just need it to run the .php file (since it is already on my server).

If there is a file downloaded and that is the only command that I can use to run it, where does it save the file? And how do i delete that downloaded file since I still have the original to run?

Any help is appreciated.
jim.thornton is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-03-2006, 06:47 AM Re: CRON Jobs - Need help knowing what is happening
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
wget is an ftp fetch command (which does nothing but grap the file).

To run your script from your server make you cronjob do the following.

* * * * * /path/to/php /path/to/php/script

This then will simply run that script on the server which will give you the functionality your after.

Alternately (if you job has some extra functionality) you can put together a shell script which is called via cron that does all the other stuff (like removing files after download etc).

However since you dont need to download it but just run it you cna use the example above. just set your times and dates correctly.

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to CRON Jobs - Need help knowing what is happening
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33488 seconds with 12 queries