Cron jobs

Status
Not open for further replies.

tom52710391

New Member
Messages
5
Reaction score
0
Points
0
hi i have just set up my crons to run and they are not running the files yet the files are working fine ??
 

descalzo

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

The basic command line for cron jobs. Logs all output and errors so you can see problems.

You can move the script above public_html or into a password protected directory to keep it from "accidentally" being run from the Web.

Please note: last time I checked, PHP mail() will not work via cron.

Also: for those with the base Free account, cron jobs less than 5 minutes apart do not run.

Note: if your cPanel username isn't igor , make the adjustment to your cPanel name.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
You may also wish to specify the -q flag with php to prevent it from outputting headers (e.g. /usr/bin/php -q /your/script/here)
 
Status
Not open for further replies.
Top