executing a php script every 15 min. how?

Status
Not open for further replies.

jake04

New Member
Messages
52
Reaction score
0
Points
0
I know I need to use cron jobs but I dont know were to start


before you all start slaming me about how it doesn't need to be run every 15 min

it acctualy does because i resets a game script that allows the players to connect to each other

so my question would be how to make a con job to run the file
reset.php
in folder /slg_account
 

Penguin129

New Member
Messages
68
Reaction score
0
Points
0
In the cPanel, there's a page for Cron Jobs right under Advanced (or should be). Choose standard and in the command box, type in:
Code:
php /public_html/sig_account/reset.php
Or replacing the path with whatever it is. Next, under minutes, choose it to run every 15 minutes.
 

jake04

New Member
Messages
52
Reaction score
0
Points
0
wont execute

php /public_html/slg_account/3d_racer/gamefind.php?act=reset
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
You have to use php-cron for executing cron jobs.

Try
Code:
php-cron /home/<yourcpanelusername>/public_html/3d_racer/gamefind.php?act=reset
 

jake04

New Member
Messages
52
Reaction score
0
Points
0
still does not work could it be because off the vairable?
can cron jobs contain ?= symbles
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
No. It can't have special characters. If you want to execute a PHP Page in regular intervals, use the following code.
Code:
/usr/bin/wget -O - -q http://www.yoursite.com/sub/directory/page.php?var=value
 

jake04

New Member
Messages
52
Reaction score
0
Points
0
well my cron does contain special chatacter
gamefinder.com?act= reset

were does that code go in cron?

still does not work


did x 10 not allow crons to run every min?
I set it to run every min so I dont have to wait a hour to see if it works
 
Last edited:

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Just go to Cron Jobs in Advanced Section of cPanel. Select Basic and select the Day/Month and other things and just enter the code given in my previous post in Command Field and Save.
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
How do you say that is not working? Does that script notifies you when it is executed?

If you want, PM me your cPanel Login Details & Cron specifications. I'll try to do it for you.

Edit:
I have saved Crontab with the specifications you have sent. If you have any mechanism to track whether Cron has ran, check it..

- Deleted All PMs from you.
 
Last edited:

Penguin129

New Member
Messages
68
Reaction score
0
Points
0
Hmm, that's strange, I've been trying that and other commands for a bit and none of them are working.. the command I posted earlier is the one I use on one of my websites and it works fine. I think these servers have using php as a command disabled. If you do find a solution, please post it here.
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
No. Since Free Hosting members have 3 different PHP Configurations, Corey has made php-cron for executing Cron jobs.
 
Last edited:
Status
Not open for further replies.
Top