Run a script automatically on a schedule, such as a nightly clean-up or a task every 5 minutes.
Open the control panel address from your welcome email. It ends in :2222, for example yourdomain.co.uk:2222. Enter your username and password, then click Sign in.
On the home page, scroll to the Advanced Features section and click Cronjobs.
Under Create a New Cron Job, fill in when it runs. A * means "every". The example runs every 5 minutes:
*/5*In Command, type php, a space, then the full path to your script:
php /home/yourusername/domains/yourdomain.co.uk/public_html/cron.php
Click Prevent Email if you don't want an email every time it runs, then click Add.
1,15,30 not 1, 15, 30.Your cron job now shows in the list below the form. To change or remove it, tick Select and use Edit or Delete.
Copy the values into the five time boxes, from Minute to Day of Week. Times use the server clock, shown as Current Time above the form.
| Runs | Minute | Hour | Day of Month | Month | Day of Week |
|---|---|---|---|---|---|
| Every 5 minutes | */5 | * | * | * | * |
| Every hour, on the hour | 0 | * | * | * | * |
| Every day at 3am | 0 | 3 | * | * | * |
| Every Monday at 9am | 0 | 9 | * | * | 1 |
| 1st of each month at midnight | 0 | 0 | 1 | * | * |
Always start the command with php for a PHP script. A path on its own, like /home/yourusername/cron.php, won't run. Please don't schedule jobs more often than every 5 minutes.
To call a page by its web address instead of its file path, use:
curl --silent https://yourdomain.co.uk/cron.php > /dev/null