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

Changing Maximum Upload Size

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

What port is MariaDB - MySQL on?

MariaDB / MySQL is on Port 3306.      

Increase PHP Memory

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

I am having problems with a script I wrote.

PHP suexec is running on all of our shared servers. If you are running code that is insecure or...

How can I find my MariaDB - MySQL version?

Login to cPanel In the "Stats" section on the left, locate the row labeled "MariaDB or MySQL...