Cron schedule syntax explained (with examples)

Read and write cron schedules: the five fields, *, ranges, lists and step values, plus copy-ready examples for common schedules.

ReferenceIntermediate2 min readUpdated
┌──────── minute (0–59)
│ ┌────── hour (0–23)
│ │ ┌──── day of month (1–31)
│ │ │ ┌── month (1–12)
│ │ │ │ ┌ day of week (0–6, Sunday = 0)
│ │ │ │ │
* * * * *

Symbols

SymbolMeaningExample
*Every value* in hour = every hour
,A list1,15 = the 1st and 15th
-A range1-5 = Monday to Friday
/Steps*/10 = every 10

Examples

ScheduleFields
Every minute* * * * *
Every 5 minutes*/5 * * * *
Every 15 minutes*/15 * * * *
Every hour, on the hour0 * * * *
Every day at 02:3030 2 * * *
Weekdays at 08:000 8 * * 1-5
Every Sunday at 04:000 4 * * 0
1st of every month at midnight0 0 1 * *
Twice a day, 06:00 and 18:000 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.

Popular

Tip: press / to search from any pageSee all results