Problem:
Q: How do I run a php file using Cron jobs?
Solution:
A: From the cPanel, go to Cron jobs, select Standard, and enter (between the quotes) "/usr/bin/php -q /home/USERNAME/public_html/PathToFile" into the Command to run field. You may also want to adjust the settings specifying when to run the cron job. After you finished, click on the SaveCrontab button.
Note: You will need to replace USERNAME with your user ID and PathToFile with the file name or the rest of the path to the file. Also Note: If you want to use your own php.ini settings for the script you are running you will need to add the following "-c /home/USERNAME/PathTo/php.ini" to the cron job entry.
Keywords: cron jobs php file
|
Add to Favourites
Print this Article
|