Using a cron job is a great way to automatically perform a task at regular intervals all the way from once a minute to once a year. Instructions for scheduling a cron can be found in our documentation.

It is not possible to simply enter the URL of the script in the cron command field, instead there are two ways to execute PHP scripts in a cron job:

  1. Using the PHP command eg. php ~/public_html/my_script.php
  2. Using the wget command eg. wget -o /dev/null -O - http://example.com/my_script.php
That's all there is to it, at the scheduled time your script will be executed.

Was this answer helpful? 0 Users Found This Useful (9 Votes)

Powered by WHMCompleteSolution