crons dont work

kolanich

New Member
Messages
37
Reaction score
0
Points
0
The crons don`t work!!!
the command is /usr/bin/php -q /home/kolanich/public_html/<script>
my site is on stoli
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
On Lotus, the following works:

Code:
/usr/local/bin/php -q /home/username/public_html/crontest.php

1. Set the email notification to an address you can check. Error messages can be helpful and you can always turn it off once you get the cron job working the way you want.

2. Use absolute paths in the script. The working directory seems to be /home/username , not the directory where the script is located.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
2. Use absolute paths in the script. The working directory seems to be /home/username , not the directory where the script is located.

2 dont understend
what do you mean

Say your script is in /home/username/public_html
Say you want to create a file "cron_output.txt" to append to.
If you use fopen( "cron_output.txt" , "a" ) , the file will be in /home/username , not /home/username/public_html
You should use fopen( "/home/username/public_html/cron_output.txt" , "a" )
 

kolanich

New Member
Messages
37
Reaction score
0
Points
0
i see there is no effect
script made no action!!!
because it hasn`t been launched
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
***Moved to Programming Help***
 
Top