run php code in a cronjob

diligo

New Member
Messages
2
Reaction score
0
Points
0
Hi all,

how to run my php code as a cronjob? I'm testing out sending email every 30 mins. I tried /usr/bin/php /home/<username>/public_html/<program name>.php but it does not work even though when i run the program manually, it works. Thanks in advance.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
Try: php-cron /home/<username>/public_html/<program name>.php
 
Top