Create and monitor cron jobs
Schedule repeatable commands for maintenance, imports, queues and other application work.
Where Websites โ your website โ Advanced โ Cron jobs
What this is for
- Schedule a command at a predictable interval.
- Use the correct PHP or shell path.
- Avoid overlapping or excessively frequent work.
Before you start
- Test the complete command manually and use absolute paths.
- Choose an interval that allows one run to finish before the next begins.
Take care
A bad or over-frequent command can consume resources, send duplicates or corrupt data. Test it once before scheduling it.
Steps
-
1
Prepare the command or request URL and test it once manually in the website environment.
-
2
Open Websites, select the website, open Advanced, choose Developer tools and then Cron jobs in the left-hand menu.
-
3
Select Add cron job and choose whether the job runs a command or calls a request URL when that choice is offered.
-
4
Enter the complete command using absolute paths. For WordPress WP-CLI jobs, include the correct --path value for the installation folder.
-
5
Choose a preset interval or enter a custom schedule. In a five-part cron schedule the fields mean minute, hour, day of month, month and day of week.
-
6
Save the job and check that the row shows the intended command and interval.
-
7
Wait for the first due run and look for the expected application result or log entry. Use the three-dot row menu to edit or remove a bad job.
-
8
Leave Allow editing of cron from website container off unless a trusted application genuinely needs to alter the crontab itself.
Check it worked
- The cron job appears as enabled with the intended schedule and command.
- After the first due time, the application or log contains one successful result rather than repeated or overlapping runs.
What the controls do
| Control | What it means |
|---|---|
| Run command / request URL | The exact server command or web address executed by the scheduler. |
| Interval | Defines how often the job runs. A custom five-part expression uses minute, hour, day of month, month and day of week. |
| Three-dot menu | Opens actions for the existing cron row, such as editing or deleting it. |
| Allow editing from website container | Lets website processes change cron themselves; keep it off unless there is a specific trusted need. |