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

Warning: system() has been disabled for security reasons

system is a feature of php which is disabled by default. To change this if needed for a...

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

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

403 Forbidden error with Drupal after install.

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

Register Globals On

If you run a script that requires php "register globals on" create a php.ini file and include the...