Start a conversation

How do I run a php file using Cron jobs?

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.

sample_bd-registration_application.doc

  1. 30 KB
  2. View
  3. Download
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Support-Agent

  2. Posted
  3. Updated

Comments