How to create and run Cron job in PHP?
I want to create and setup a cron job for my web application.
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
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
[img alt_text=” description=”]http://avianceschool.com/wp-content/uploads/2017/03/screenshot-cleonix.net-2082-2017-03-06-17-36-06.png[/img]