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

How can I run PHP5?

PHP5 is now the default PHP ran on our servers. Nothing further is required.

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

Error 500 - Internal Server Error - PHP

This can be due to several factors. The first thing to check is that the permissions on the file...

Register Globals On

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

Useful CSV to MySQL Script

Provided below is a great tool we have run into for converting CSV files into MySQL format: CSV...