Cron Expression Explainer

Read a cron expression in plain English and Arabic, and see when it runs next.

How to use

What it checks and how it works

The explanation comes from cronstrue, an open-source library that turns a cron expression into words, using its English and Arabic locales. The upcoming run times are worked out by this tool for a standard five-field expression (minute, hour, day of month, month, day of week) in UTC, following the Linux crontab(5) manual page: fields take lists, ranges and steps, names such as JAN and MON, and 0 or 7 for Sunday. When both the day-of-month and day-of-week fields are restricted, the job runs when either one matches. The macros @yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly are expanded. Limits: the run list does not support seconds or year fields, the question mark, L, W and # (Quartz extensions), or time zones other than UTC, although cronstrue can still explain some of those expressions in words. Cron dialects differ, so check your scheduler's own documentation. The Arabic wording is cronstrue's own and is shown unedited, so some phrases may read awkwardly.

Why does a cron job run on days I did not expect?

Under crontab(5), when both the day-of-month and day-of-week fields are restricted, the job runs when either matches. For example, 30 4 1,15 * 5 runs at 04:30 on the 1st and 15th of each month and on every Friday.

Does it read Quartz or six-field expressions?

cronstrue can explain some of them in words, but the list of upcoming runs is for five-field expressions. Seconds, year, ?, L, W and # are not supported there.

Which time zone are the run times in?

UTC. Cron uses the time zone of the machine or service that runs it, so convert the times to match your scheduler.

Sources

Related tools

Privacy

Runs in your browser; nothing is uploaded. The interactive tool needs JavaScript.