┌──────── minute (0–59)
│ ┌────── hour (0–23)
│ │ ┌──── day of month (1–31)
│ │ │ ┌── month (1–12)
│ │ │ │ ┌ day of week (0–6, Sunday = 0)
│ │ │ │ │
* * * * *
Symbols
| Symbol | Meaning | Example |
|---|---|---|
* | Every value | * in hour = every hour |
, | A list | 1,15 = the 1st and 15th |
- | A range | 1-5 = Monday to Friday |
/ | Steps | */10 = every 10 |
Examples
| Schedule | Fields |
|---|---|
| Every minute | * * * * * |
| Every 5 minutes | */5 * * * * |
| Every 15 minutes | */15 * * * * |
| Every hour, on the hour | 0 * * * * |
| Every day at 02:30 | 30 2 * * * |
| Weekdays at 08:00 | 0 8 * * 1-5 |
| Every Sunday at 04:00 | 0 4 * * 0 |
| 1st of every month at midnight | 0 0 1 * * |
| Twice a day, 06:00 and 18:00 | 0 6,18 * * * |
Day of month and day of week together
If both are set (not *), the job runs when either matches. 0 9 1 * 1 runs at 09:00 on the 1st and on every Monday.
Server time
Schedules run in the server’s timezone, which may not be UK time, and doesn’t necessarily follow British Summer Time. For timing that matters, check the server time with a test job that writes date to a log.
Avoid the top of the hour
Many jobs everywhere run at 0 minutes. Picking an odd minute, such as 17 3 * * *, spreads load.
New to Traxio? The PHP hosting page lists the PHP versions, database and tools every account gets, free for the first 30 days.