Minute, hour, day, month, weekday
Explain a cron expression
Cron is five fields. This page tells you what they select and computes the next five matches in this device's local time.
The fields are minute, hour, day of month, month, and day of week. A star, a number, a list, a range, and a step such as */15 are accepted. Month and weekday names are accepted. Day 7 means Sunday. When both the day and the weekday are restricted, a date matches if either field matches, which is the usual cron rule. A six-field expression that starts with seconds is rejected so it is not read as the wrong columns. The page does not install the expression on a server.
The next times are calculated in this tab from this device's clock.
This tool runs in your browser. Turn on JavaScript to use it.
Weekday mornings
09:00 from Monday through Friday. The next run depends on the clock in this tab.
- Expression
- 0 9 * * 1-5
- Meaning
- 09:00, Mon–Fri
How to use it
- 1Paste five fields.
- 2Read the summary and the next five local times.
- 3If you pasted seconds, delete that first field and try again.
Good to know
- Local time, not UTC, unless this device is set to UTC.
- No seconds field.
- Both day and weekday restricted means either one can match.
Questions
Why was a six-field line rejected?
The first field would be read as minutes. Remove the seconds field first.
Does 0 in the weekday mean Sunday?
Yes. 7 is also Sunday.
Will this schedule a job?
No. It only explains the expression.
Related tools
- Convert a Unix timestamp
Unix time counts seconds from the start of 1970 in UTC. JavaScript often counts milliseconds instead. Mixing the two shifts the date by about thirty years, or by a factor of a thousand.
- Calculate chmod permissions
chmod talks in octal and in letters. This page shows both for the same bits, including the extra digit for setuid, setgid, and the sticky bit.
- Test a JavaScript regular expression
Regular expressions in JavaScript are not the same as PCRE or .NET. This page uses the RegExp your browser already ships, so a match here is a match in frontend code.