|
#1
|
|||
|
|||
|
Hi,
I have a shared account and want to set up a cron job to run a script once a day. Way I understand it, you go to cpanel > Cron jobs > Standard and then choose the times you want. My question is, what do I put into the box labelled 'Command to run'? Do I just put in the path to the script I want to run, like this? http://www.mydomain.com/directory/scriptname.php Or is it something else altogether? I know zip about unix, linux, C, php and anything else you care to mention! ![]() Your help is much appreciated! Best regards, Jill |
|
#2
|
|||
|
|||
|
For PHP scripts, like this:
/usr/bin/php /home/useraccount/public_html/example.php Thus, your script is called and run via the PHP interpreter (/usr/bin/php) Note: Don't use URL's with this method, only paths.
|
|
#3
|
||||
|
||||
|
I guess it will depend on the script so u should read the instructions anyway either php -q /path/script.php or usr/bin/GET http://site.com/script.php
Antonio. |
|
#4
|
|||
|
|||
|
Hi guys,
Thanks for your replies! I'll try out your suggestions. Regards, Jill |
|
#5
|
|||
|
|||
|
Because this topic was left with a bit of a cliffhanger as to whether either suggestion actually worked, I wanted to say that Twisty's suggestion worked perfectly for me after an hour of messing around with other methods.
|
|
#6
|
||||
|
||||
|
Or you can visit it with a web browser like lynx:
lynx -dump http://www.yoursite.com/cron.php But the result is the same.
__________________
Calum Computer & Web Development Forum Skiing & Snowboarding News Bidding Directory |
![]() |
| Bookmarks |
| Thread Tools | |
|
|