Cron Jobs with PHP Files Print

  • 0

From the cPanel, click the Cron Jobs icon and enter the following into the Command field:

 /usr/bin/php -q /home/USERNAME/public_html/PathToFile

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.

Note: You may need to adjust /home/ to /home1/ or home2/ or a different number depending on the home directory your account resides on. To view the home directory for your account simply view the stats column on the main cPanel page of your account and look for the home directory.

Note: To specify the php.ini file to use you may add "-c /home/USERNAME/PathTo/php.ini" to the cron job entry.


Was this answer helpful?

« Back