thoughtasylumTOOLBOX Preview

Tools › Developer

Cron Explainer

Describes a cron expression in English, lists its next 10 runs, and gives the launchd StartCalendarInterval that matches it, with a builder for writing one from menus and tick boxes.

About this tool What it's for, how to use it and an example

What it's for

Understand a cron schedule before you rely on it. The tool describes it in plain English, lists the next ten times it will run, and converts it to the StartCalendarInterval that macOS launchd jobs use.

For example, when you’re setting up a scheduled job, or inherit a crontab line you don’t understand, check exactly when it fires.

How to use it

Type a cron expression with five fields: minute, hour, day of month, month and day of week. Lists (1,15), ranges (9-17), steps (*/15) and names such as jan and mon all work, as do the shortcuts @hourly, @daily, @weekly, @monthly and @yearly. The description and next runs update as you type, in your local time, and the launchd version is ready to copy into a plist.

To write one from scratch, open Build an expression: choose the minute, the hours and the days of the month from the menus (every, every N, at a list, or a range), and tick days of the week and months. The expression is written as you choose, with runs of days shortened to ranges such as 1-5 for Monday to Friday.

Example

Type this:

*/15 9-17 * * mon-fri

The tool describes it as “Every 15 minutes, during hours 9 through 17, on Monday through Friday.” The next runs start at 09:00 on the next weekday, then 09:15, 09:30 and so on.

Good to know

When both the day-of-month and day-of-week fields are set, the job runs if either matches, which surprises many people; cron and launchd both work this way. Six-field expressions with seconds aren’t supported.

Build an expression
Days of the week (none ticked for every day)
Months (none ticked for every month)

Next runs

    Five fields: minute, hour, day of month, month, day of week. Names such as jan and mon work, as do @hourly, @daily, @weekly, @monthly and @yearly. When both day fields are set, either one matching is enough, in cron and launchd alike.

    Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.

    Saved you a few minutes? Say thanks with a coffee.

    Something wrong with this tool, or missing from it? Report a bug or suggest a feature.

    ↑ ↓ move↵ openesc close