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

403 Forbidden error with Drupal after install.

Remove the following lines from the .htaccess file... Options -Indexes Options FollowSymLinks...

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...

Clean - Shrink ibdata1

To shrink ibdata1 once and for all you must do the following: MySQLDump all databases into a...

Increase PHP Memory

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

How can I parse .html as .php?

Create an .htaccess file and upload it to the root of your public_html directory. Include the...