Cron Jobs

fierce

New Member
Messages
222
Reaction score
0
Points
0
I got problem with running the turn script on my game www.eraoferadication.co.cc .I entered this in the cron jobs "/fierce/local/bin/php turns.php" and made folder leading to the path .
Pls some1 good @ cron jobs tell me what should I do ..

Thx in Advance

fierce .
 
Last edited:

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
I'm not particularly "good at cron jobs" but I'm using this line for the very same purpose as you. Yours should be this:

"php -q /home/fierce/local/bin/php turns.php"

Except that a space in a file name is probably not a good idea, you may want to place an underscore "_" instead (unless you actually meant bin/php/turns.php).

The -q prevents it from sending you an e-mail, you can remove it if your prefer.
 
Last edited:

fierce

New Member
Messages
222
Reaction score
0
Points
0
I tried with both "php -q /home/fierce/local/bin/php turns.php" ,

"php -q /home/fierce/local/bin/php_turns.php" ,

"php -q /home/fierce/local/bin/php/turns.php" and without

php - q and none

of this works...now I gtg but l8rs will post more info 'bout the

problem ..

some1 with good xp in this stuff ..pls help me ..willing to give

credits as well if some1 help me run the turn script .

Thx in Advance

fierce .
 

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
Don't you get any error? If the cron job does not work, it's supposed to send you an error e-mail. If it doesn't, you should consider revising your script itself.
 

fierce

New Member
Messages
222
Reaction score
0
Points
0
Status: 404 Not Found X-Powered-By: PHP/5.2.6 Content-type: text/html No

input file specified. - this is what I was getting when the command was

/usr/local/bin/php turns.php ..now when I changed to

/home/fierce/local/bin/php/turns.php ..I'm getting nothing ..I will send the

user and the pass of my cPanel to some1 good with this to make it work

and will give 100 credits if it successfull .

fierce .
 

Scoochi2

New Member
Messages
185
Reaction score
0
Points
0
I have cronjobs working perfectly for me.
First of all, at the top of the script you want to run, make sure the first line (before ANYTHING, even a newline) is the following:
Code:
#!/usr/local/bin/php -q
I admit that I'm not certain you need it, but it doesn't hurt anyway.
Then, for the 'command to run' in the cronjobs section of the cpanel, make it something along the lines of the following:
Code:
php-cron /home/fierce/public_html/cron.php

The above two things are exactly what I did, and it works perfectly :)
 

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
Just for the record, I don't have the first line you mentioned, just usual PHP, and it works perfectly as well, so I'd say it doesn't seem to be crucial.

And as someone once said to me, you probably don't want your cron job in a public directory, because anyone finding the url can activate the script by visiting the page (unless you password protect it, but I don't know if it can prevent the cron from accessing it as well so I haven't tried it).
 

fierce

New Member
Messages
222
Reaction score
0
Points
0
ok Scoochi2 ..I'll send ya my cPanel user and pass via PM ..and pls look into it

and fix it ..If it works you'll get 100 x10 credits .

fierce .
Edit:
I'm increasing the prize up to 300 credits .
Edit:
I'd ask 4 some from the stuff to check if there might be an error in the cron

jobs ..coz I tried lot of different ways of launching the turn script but none of

them happens to work ..

Thx in Advance
 
Last edited:

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
I'm not really comfortable with going into someone else's cPanel but I guess I could have a look during the weekend. But please check first with a moderator if it's allowed, because I think it is not and I don't want the both of us to get suspended...
 

fierce

New Member
Messages
222
Reaction score
0
Points
0
I found the problem in the php not in the cron jobs ..so now it works ..thx 2

every1 that tried to help me .I decided to give 30 credits all ppl that

helped .

Thx again

fierce .
 

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
That's what I thought ^^ Since the cron wasn't sending an error e-mail, I was pretty sure it had to be in your script (as mentioned already).

Glad you found it, thanks a lot for the credits!
 

excel123

New Member
Messages
1
Reaction score
0
Points
0
I know it was a php problem but what was the final code u used? I want 2 know cuse i have the same problem now
 
Top