Pack Camo

Cron Expression Generator

Twórz i objaśniaj harmonogramy cron prostymi słowami, z kolejnymi terminami uruchomień. Wszystko działa lokalnie — nic nie jest wysyłane.

Wejście
Cron expression · schedule picker
Wyjście
Plain-language schedule · next run times
At 9:00, on poniedziałek through piątek.

* any · , list · - range · / step · JAN–DEC and SUN–SAT names · 7 is also Sunday

Next 10 runs

Times skipped by daylight saving run just after the change; repeated times run once, except for wildcard hours.

Standard crontab syntax. Quartz and AWS EventBridge use different fields (seconds, years, ? and 1 = Sunday).

Matching text rather than times? Open the Regex Tester

Build and explain cron expressions

This cron expression generator turns a schedule into crontab syntax and back again. Type or paste an expression to read it as a plain sentence, or build one field by field with the controls, and check the next ten run times in any time zone, with daylight-saving changes accounted for. It follows the rules of the cron on every Linux server, including the ones that catch people out, and everything is worked out in your browser.

How to write a cron expression

  1. Start from a preset such as Weekdays at 9:00, or type an expression like */15 9-17 * * 1-5.
  2. Read the sentence under the input to confirm the schedule means what you think it means.
  3. Adjust a field in the builder: choose minute, hour, day of month, month or day of week, then every, every N, specific values or a range. The expression updates as you click.
  4. Pick the time zone your server or scheduler uses and check the next run times, then copy the expression into your crontab, CI workflow or job scheduler.

Cron syntax: the five fields

A standard crontab line has five fields separated by spaces, followed by the command: minute hour day-of-month month day-of-week. Some schedulers, such as node-cron and Spring, accept an optional sixth field for seconds at the front; this tool reads both forms.

Minute
0–59
Hour
0–23, in 24-hour time
Day of month
1–31
Month
1–12 or JAN–DEC
Day of week
0–6 or SUN–SAT, where 0 is Sunday and 7 is also accepted as Sunday
Seconds (optional)
0–59, as a sixth field in front of the minute

Special characters and shortcuts

  • * means every value: * * * * * runs every minute.
  • , lists values: 0 8,12,18 * * * runs at 08:00, 12:00 and 18:00.
  • - is a range: 0 9 * * 1-5 runs at 09:00 Monday to Friday.
  • / is a step: */5 * * * * is every five minutes, and 1-10/2 means 1, 3, 5, 7 and 9.
  • Shortcuts: @hourly, @daily (or @midnight), @weekly, @monthly and @yearly (or @annually). @reboot runs once when the cron daemon starts, so it has no next run time.

The day-of-month and day-of-week trap

When both day fields are restricted, cron runs the job when either one matches, not when both do. 0 0 13 * 5 therefore runs on the 13th of every month and on every Friday, not only on Friday the 13th. If either field starts with *, the two are combined with AND as you would expect. The explanation and the run times here follow that rule exactly.

Days that do not exist in a month are simply skipped: 0 0 31 * * runs only in months with 31 days, and 0 0 29 2 * runs only in leap years. To run on the last day of every month in plain cron, schedule days 28–31 and test the date in the command.

Cron schedule examples

Paste any of these into the generator to read them back as a sentence and see exactly when they will next fire. A schedule that looks right in your head is worth checking against real dates before it goes to production, especially one that runs monthly or yearly and would take weeks to reveal a mistake.

*/10 * * * *
Every 10 minutes, on the hour and at 10, 20, 30, 40 and 50 past.
0 */6 * * *
Every six hours: at 00:00, 06:00, 12:00 and 18:00.
30 2 * * *
Every night at 02:30, a common slot for backups (but see the note on daylight saving below).
0 9 * * MON-FRI
At 09:00 on weekdays.
0 0 1 * *
At midnight on the first day of every month, the same as @monthly.
0 0 1 1,4,7,10 *
At midnight at the start of each quarter.
*/30 * * * * *
Every 30 seconds, in the six-field format with seconds.

Time zones and daylight saving time

Cron uses the clock of the machine it runs on, which on most servers is UTC. Choose that zone in the next-run list to see what your job will actually do. Around daylight-saving changes, a time skipped when clocks go forward runs just after the change (02:30 becomes 03:30), and a time repeated when clocks go back runs once; jobs whose hour field is a wildcard keep running through both copies of the repeated hour, as Vixie cron does.

Other schedulers use other dialects. Quartz (Java) and AWS EventBridge use six or seven fields with seconds and years, require ? in one of the two day fields, and count days of the week from 1 for Sunday; GitHub Actions and Kubernetes CronJobs use the standard five fields in UTC. Check which format your platform expects before pasting.

Testing a pattern rather than a schedule? Try the Regex Tester.

Najczęstsze pytania

What does * * * * * mean in cron?
Five asterisks mean every minute of every hour of every day. It is the most frequent schedule standard cron allows; anything more frequent needs a scheduler with a seconds field.
How do I run a cron job every 5 minutes?
Use */5 * * * *. The step */5 in the minute field matches minutes 0, 5, 10 and so on up to 55.
How do I run a cron job every day at midnight?
Use 0 0 * * *, or the shortcut @daily (also written @midnight). Remember that midnight is in the time zone of the server running cron, often UTC.
How do I schedule a cron job on weekdays only?
Put 1-5 in the day-of-week field, for example 0 9 * * 1-5 for 09:00 Monday to Friday. MON-FRI works as well.
Is Sunday 0 or 7 in cron?
Both. Standard cron accepts 0 and 7 for Sunday, and the names SUN to SAT. Quartz and AWS are different: they number the days 1 to 7 starting with Sunday.
Why does my cron job run on more days than I expected?
If you set both the day of month and the day of week, cron runs when either matches. Set one of the two fields to * to require only the other.
Which time zone does cron use?
The system time zone of the machine, unless the crontab sets CRON_TZ or the scheduler has its own setting. Cloud schedulers such as GitHub Actions use UTC.
Does cron support seconds?
Standard crontab does not; its smallest unit is the minute. Libraries such as node-cron, Spring and Quartz accept an extra seconds field at the front, which this tool also understands.