Running a PHP file with a cron job

To run a PHP file from cron, use the "cron jobs" section of your control panel. Use the following line and modify it for your account and filename and location:

php -q -f /home/username/public_html/location/script.php


Share this page:


Was this article useful? Have any suggestions or improvements to the information?

Also Read

What is the path to PHP5?

We are currently running the latest stable version of PHP5. /usr/bin/php

What is the Path to ImageMagick?

The path to ImageMagick is /usr/bin/

Increase PHP Memory

Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted (tried to allocate 1064256 bytes)....

Learn MySQL

If you do not know how to use MySQL there are some great guides at the following websites....

What is the proper MariaDB - MySQL import and export format?

The easiest way to import and export a database is via the backup section of our hosting control...