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

Premature end of script headers

If you receive an Internal Server Error 500 and checking your log files displays "Premature end...

How do I add a user to a MariaDB & MySQL database?

In the MariaDB / MySQL Database section of your hosting control panel, after creating a database...

Strict Standards: Non-static method JLoader::register() should not be called statically in...

This error indicates your script is using out-dated PHP commands. It is best to update your...

Changing Maximum Upload Size

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

What is the path to PHP5?

We are currently running the latest stable version of PHP5. /usr/bin/php