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

How can I run PHP5?

PHP5 is now the default PHP ran on our servers. Nothing further is required.

How do I import into a MariaDB - MySQL database?

Log into your control panel and go into the MariaDB - MySQL section. Make sure you have an...

Learn MariaDB

MariaDB is a drop-in replacement for MySQL. The lead developer and founder of MySQL, Michael...

HTTP Authentication error in PHP

Issues with HTTP Authentication error in PHP. Variables $_SERVER['PHP_AUTH_USER'] and...

Could not connect to the MariaDB - MySQL database

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