Cron job Help

Status
Not open for further replies.

nadavg122

New Member
Messages
6
Reaction score
0
Points
0
Hi,
I want to create a cron job which runs a php file every minute.
I'm having problems with the script for the job.
I tried few syntaxs (like: php-cron -q /public_html/bursa.php >/dev/null
or : php -q /home/nadav/public_html/test.php)

Also I tried syntax with php.exe reference and...don't work :(
Can you help me?...

I am willing to create a tutorial after I'll get it...

Thanks,
Nadav.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Step 1: Cron jobs on Free Accounts must be 5 minutes apart in execution, both from themselves and from any other cron job.
 

nadavg122

New Member
Messages
6
Reaction score
0
Points
0
Thank you for the kind answer and help.

Can you please write me the correct syntax?
I will run the job only every 10 minutes...

Thanks Again,
Nadav.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Code:
/usr/bin/php -q  /home/igor/public_html/cron_job.php >>/home/igor/public_html/cron_log.txt 2>&1

is the format that works for me. Replace "igor" with you cPanel username. This will log any output and/or error messages.
 
Status
Not open for further replies.
Top