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

When trying to connect to MariaDB or MySQL you receive error 2003 Cannot connect to MySQL on x.x.x.x on port 3306 (10060)

Please ensure you have added the remote IP to the allow list in your hosting control panel...

Changing Maximum Upload Size

Firts check your control panel for the "PHP Options" icon. If available you can change the PHP...

403 Forbidden error with Drupal after install.

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

Increase PHP Memory

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

How do I backup a MariaDB - MySQL Database?

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