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

  • 286 Users Found This Useful

Was this answer helpful?

Related Articles

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 can I find my MariaDB - MySQL version?

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

Register Globals On

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

InnoDB: Error: Attempted to open a previously opened tablespace. Previous tablespace

When receiving the error     "InnoDB: Error: Attempted to open a previously opened tablespace....

Changing Maximum Upload Size

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