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

Test MySQL Connection

The following is a great way to verify a MySQL / MariaDB database connection issue. Create a file...

Warning: Unknown(): open_basedir restriction in effect

Basedir restriction is set for security. This most often occurs when you are calling an app...

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

Premature end of script headers

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

Learn MySQL

If you do not know how to use MySQL there are some great guides at the following websites....