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

PHP information

To view your current version of PHP you will create a php file, for example info.php, and place...

403 Forbidden error with Drupal after install.

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

Internal Server Error with PHPList

PHPList produces internal server error. Checking error logs results in: Invalid command...

Warning: Unknown(): open_basedir restriction in effect.

Basedir restriction is set for security. This most often occurs when you are calling an app...

How do I backup a MariaDB - MySQL Database?

In the control panel, within Backup section, under Download a SQL Database Backup will be your...