Skip to content
HNarzędzia
en
Categories

Cron expression generator and explainer

Enter a cron expression to see what it means and when it will run next - or build a schedule in the visual builder and pick from common presets.

  • Free
  • No sign-up
  • Private
  • Runs locally

minute · hour · day of month · month · day of week (optionally seconds first)

Meaning
Translating the expression…

Examples

Builder

Changes in the builder immediately replace the expression above.

Expression fields

FieldValueAllowed
Minute00-59
Hour90-23
Day of month*1-31, ? L W
Month*1-12, JAN-DEC
Day of week1-50-7 (0 and 7 = Sunday), SUN-SAT, ? L #

How to create a cron expression

  1. 1.

    Pick a preset or use the builder

    Click a preset such as “Weekdays at 9:00” or set the frequency in the builder.

  2. 2.

    Edit the expression

    Fine-tune the expression by hand - the explanation and run list update live.

  3. 3.

    Check the next runs

    Compare the next 10 run times (in your browser time zone) with what you expect.

  4. 4.

    Copy it

    Paste it into crontab -e, a GitHub Actions workflow or a Kubernetes CronJob.

Cron syntax - the five fields

A standard cron expression has five space-separated fields: minute hour day-of-month month day-of-week.

FieldRangeExample
Minute0-5930 - at minute 30
Hour0-239-17 - 9:00 to 17:59
Day of month1-311,15 - the 1st and 15th
Month1-12 or JAN-DEC*/3 - every 3 months
Day of week0-7 or SUN-SAT (0 and 7 = Sunday)1-5 - Monday to Friday

Use * for any value, , for lists, - for ranges and / for steps. Example: */15 9-17 * * 1-5 = every 15 minutes from 9:00 to 17:45 on weekdays. Macros: @hourly, @daily (= @midnight), @weekly, @monthly, @yearly (= @annually) and @reboot, which runs once at start-up and therefore has no next run times.

Common cron expressions

ExpressionMeaning
* * * * *every minute
*/5 * * * *every 5 minutes
0 * * * *every hour, on the hour
0 */6 * * *every 6 hours (0:00, 6:00, 12:00, 18:00)
0 0 * * *every day at midnight
0 9 * * 1-5weekdays at 9:00
0 3 * * 0Sundays at 3:00 (e.g. backups)
0 0 1 * *midnight on the 1st of every month
0 0 1 1 *once a year, 1 January

Gotcha: when both day of month and day of week are restricted (e.g. 0 0 13 * 5), classic cron runs the job on every 13th and every Friday - the conditions are combined with OR, not AND. The tool shows a warning when this happens.

Crontab vs GitHub Actions vs Kubernetes vs Quartz

SystemFieldsTime zoneNotes
crontab (cronie, Vixie cron)5server time zonesupports @reboot, @daily etc.
GitHub Actions on: schedule5always UTCshortest interval 5 minutes; runs can be delayed under load
Kubernetes CronJob5controller time zone or timeZone (1.27+)supports @hourly, @daily etc.
Quartz / Spring @Scheduled6-7 (seconds first, optional year)configurable? L W #; Quartz requires ? in one of the day fields

This tool accepts 5 fields and 6 fields with seconds first; the 7-field Quartz format with a year is not supported. Because GitHub Actions uses UTC, a job meant for 9:00 in New York needs 0 13 * * * in summer (UTC−4) and 0 14 * * * in winter (UTC−5).

Cron and daylight saving time

Where clocks change, one night a year has an hour that does not exist and another has an hour that happens twice. A job set to 30 2 * * * can therefore be skipped in spring and run twice in autumn, depending on the cron implementation. Schedule important jobs (backups, reports) outside the 1:00-3:00 window or run servers in UTC. The run list in this tool skips times that do not exist in your browser time zone.

Frequently asked questions

How do I run a cron job every 5 minutes?

+
Use */5 * * * *. The job runs at minutes 0, 5, 10, …, 55 of every hour.

How do I run cron every day at midnight?

+
Use 0 0 * * * or the macro @daily (the same as @midnight).

How do I run a job on weekdays only?

+
Put the range 1-5 in the day-of-week field, e.g. 0 9 * * 1-5 for Monday to Friday at 9:00. Cron does not know public holidays, so it still runs on them.

Is Sunday 0 or 7?

+
Both mean Sunday in crontab. Quartz numbers days 1 (Sunday) to 7 (Saturday), so names like SUN-SAT are safer.

Which time zone does cron use?

+
Crontab uses the server time zone, GitHub Actions always uses UTC and Kubernetes the controller time zone or the one set in timeZone. This tool shows run times in your browser time zone.

Can cron run every 30 seconds?

+
Not classic cron - its smallest unit is one minute. Quartz, Spring and node-cron accept 6 fields: */30 * * * * *. In crontab you can add a second entry that starts with sleep 30.

What does ? mean in a cron expression?

+
It means “no specific value” in Quartz and Spring. It goes in either day of month or day of week when the other one is set, e.g. 0 0 12 ? * MON-FRI.

Updated: