problems with cronjobs

Status
Not open for further replies.

nord-see72

New Member
Messages
3
Reaction score
0
Points
0
hey everyone
i want to run a cronjob once a day to execute an php file but i hav no idea what expression is should put in the command box
thanks
 

descalzo

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

Replace "igor" with your cPanel username and adjust paths as needed (you do not have to put them in a directory named cron). They can be any path below /home/igor . Having them below /home/igor/public_html means they are accessible from the web.

cron_log.txt will contain any error messages or regular output (ie print or echo commands) from your script. Not 100% necessary, but helps with debugging or logging info.
 
Status
Not open for further replies.
Top