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

Could not connect to the MariaDB - MySQL database

You will want to verify you are using the correct database name, username and password. All...

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

How can I view/modify data in my MariaDB - MySQL database?

Only make changes if you know exactly what you are doing. Often incorrect changes can have an...

I am having problems with a script I wrote.

PHP suexec is running on all of our shared servers. If you are running code that is insecure or...

403 Forbidden error with Drupal after install.

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