I am just trying to run a PHP script using a cron job within CPanel - is this the correct syntax:
/usr/bin/php -q /home/username/public_html/cron/cron.php >/dev/null
I am not getting any email notifications stating a cron has been completed, do I need to do anything specific with the PHP file?
This question is tagged with
~ Asked on 2011-09-07 11:05:39
In crontab system :
/usr/bin/phpis php binary path (different in some systems ex: freebsd
/home/username/public_html/cron/cron.phpshould be your php script path
/dev/nullshould be cron output , ex:
So you can monitor your cron by viewing cron output
~ Answered on 2011-09-07 11:18:32
I used this command to activate cron job for this.
/usr/bin/php -q /home/username/public_html/yourfilename.php
on godaddy server, and its working fine.
~ Answered on 2012-03-13 10:37:13