How to create and run Cron job in PHP?

I want to create and setup a cron job for my web application.

Team Leader Asked on March 4, 2017 in PHP.
Add Comment
1 Answer(s)

Command to run a PHP5 cron job:
php /home/user_name/public_html/cronjob.php

Optional flags are sometimes required for a PHP cron job:
php -q /home/user_name/public_html/cronjob.php

Command to use a specific php.ini file:
php -c /home/user_name/public_html/php.ini /home/username/public_html/cronjob.php

Command to GET a remote file:
/usr/bin/GET http://www.domainname.com/cronjob.php

 

RE: How to create and run Cron job in PHP?

Team Leader Answered on March 6, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.