Cron Expression
Explain · Next runs · Build
0
minute
9
hour
*
day (month)
*
month
1-5
day (week)
At 09:00 on Monday through Friday.

    Next run times

    1. The next run times appear here.

    Build an expression

    On
    Result
    FieldValueMeaningAllowed

    How to use this cron tool

    1. Paste or type a cron expression, for example */15 * * * *. You can also paste a whole crontab line with the command after it, a macro such as @daily, or an AWS cron(…) expression.
    2. Read the explanation. The blue box says in plain English when the job runs. Below it, each field is shown on its own, and notes point out common traps, such as the day-of-month / day-of-week rule.
    3. Check the next run times. Choose your own time zone, UTC (GitHub Actions) or the time zone of your server, and see the next 5 to 50 runs with how far away they are.
    4. Build one with the form if you do not know the syntax: every N minutes, every N hours, every day, on chosen weekdays, monthly or yearly.
    5. Use it in… turns the schedule into ready code for crontab, GitHub Actions, Kubernetes, Spring, Quartz or AWS EventBridge, and warns when that platform cannot express it.

    The tool understands 5-field standard cron, 6-field Spring expressions with seconds, Quartz (6 or 7 fields, with ?) and AWS EventBridge. Auto-detect picks the format from the number of fields and where the ? is; you can change it with Read as.

    Cron syntax

    A standard cron expression has five fields, separated by spaces:

    ┌───────────── minute (0–59)
    │ ┌─────────── hour (0–23)
    │ │ ┌───────── day of the month (1–31)
    │ │ │ ┌─────── month (1–12 or JAN–DEC)
    │ │ │ │ ┌───── day of the week (0–7 or SUN–SAT; 0 and 7 are Sunday)
    │ │ │ │ │
    * * * * *  command to run

    Special characters

    CharacterMeaningExample
    *Every value of the field* * * * * = every minute
    ,A list of values0,30 in minutes = at :00 and :30
    -A range (both ends included)1-5 in day of week = Monday to Friday
    /A step: every Nth value*/10 in minutes = 0, 10, 20 … 50
    ?No specific value (Quartz, AWS: one day field must be ?)0 0 12 ? * MON
    LLast: last day of the month, or the last given weekday of the monthL in day of month; 5L = last Friday
    WThe weekday (Mon–Fri) nearest to a day of the month15W; LW = last weekday of the month
    #The Nth given weekday of the month1#1 = first Monday (Quartz/AWS: 2#1)

    L, W and # work in Spring, Quartz and AWS, but not in standard Linux crontab, GitHub Actions or Kubernetes.

    Macros

    MacroSame asMeaning
    @yearly, @annually0 0 1 1 *Once a year, at midnight on 1 January
    @monthly0 0 1 * *At midnight on the first day of every month
    @weekly0 0 * * 0At midnight every Sunday
    @daily, @midnight0 0 * * *Every day at midnight
    @hourly0 * * * *At the start of every hour
    @reboot—Once, when the system starts (crontab only)

    Common cron expressions

    Click an expression to load it into the tool above and see its next run times.

    ExpressionRuns
    * * * * *Every minute
    */5 * * * *Every 5 minutes
    */15 * * * *Every 15 minutes
    */30 * * * *Every 30 minutes
    0 * * * *Every hour, on the hour
    0 */2 * * *Every 2 hours
    0 */6 * * *Every 6 hours (00:00, 06:00, 12:00, 18:00)
    0 0 * * *Every day at midnight
    0 9 * * *Every day at 09:00
    0 8,20 * * *Twice a day, at 08:00 and 20:00
    0 9 * * 1-5Monday to Friday at 09:00
    */10 9-17 * * 1-5Every 10 minutes during working hours on weekdays
    0 10 * * 0,6Saturday and Sunday at 10:00
    0 0 * * 0Every Sunday at midnight (once a week)
    0 0 1 * *At midnight on the first day of every month
    0 0 1,15 * *On the 1st and the 15th of every month
    0 0 1 */3 *Every quarter: 1 January, April, July and October
    0 0 1 1 *Once a year, on 1 January
    0 0 L * *Last day of every month (Spring, Quartz, AWS; not crontab)
    0 17 * * 5LLast Friday of the month at 17:00 (not crontab)

    Cron in different tools

    The idea is the same everywhere, but the details are not. These differences cause most surprises:

    WhereFieldsTime zoneWatch out for
    Linux crontab (cronie, Vixie cron)5: m h dom mon dowServer time; CRON_TZ= line in many versionsA % in the command means a new line, so write \%. Cron has a small PATH: use full paths.
    GitHub Actions5Always UTCShortest interval is 5 minutes. Runs can start late when GitHub is busy.
    Kubernetes CronJob5spec.timeZone (Kubernetes 1.27+)Set concurrencyPolicy if one run may still be busy when the next starts.
    Spring @Scheduled6: s m h dom mon dowzone attributeBoth day fields must match (no either-or rule). Supports L, W, #.
    Quartz6–7: seconds first, optional yearinTimeZone(…)Day of week is 1–7 starting on Sunday. One day field must be ?.
    AWS EventBridge6: m h dom mon dow yearUTC for rules; Scheduler has a time zone settingWritten as cron(…). Day of week 1–7 = SUN–SAT. One day field must be ?.
    systemd timersOwn format: OnCalendar=Mon..Fri 09:00Local, or a zone after the timeNot cron syntax. Test with systemd-analyze calendar "…".

    Frequently asked questions

    What is a cron expression?

    A cron expression is a short text that describes a repeating schedule. Standard cron uses five fields separated by spaces: minute, hour, day of the month, month and day of the week. For example 0 9 * * 1-5 means at 09:00, Monday through Friday. A * means every value, so * * * * * runs every minute.

    What does */5 mean in cron?

    The slash sets a step. */5 in the minute field means every 5th minute starting at 0: minutes 0, 5, 10 and so on up to 55. 10-30/5 means every 5th minute from 10 through 30. A step counts from the start of the range, so */7 in the minute field runs at minutes 0, 7, 14 … 56 and then again at 0, which is only 4 minutes later.

    Why does my cron job run on more days than I expected?

    When both day of the month and day of the week are set (neither is *), standard cron runs the job when EITHER of them matches. So 0 9 1-7 * 1 runs on days 1 to 7 of every month and also on every Monday, not only on the first Monday. Spring, Quartz and AWS work differently: Quartz and AWS need a ? in one of the two fields.

    How do I run a cron job on the first Monday or the last Friday of the month?

    In Spring, Quartz and AWS write the day of the week with # or L: MON#1 (Quartz and AWS: 2#1) is the first Monday and FRIL (Quartz and AWS: 6L) is the last Friday. Standard crontab has no such syntax. There, run the job on days 1 to 7 and test the weekday in the command: 0 9 1-7 * * [ "$(date +\%u)" = 1 ] && /path/to/job. The % must be escaped as \% inside a crontab.

    Which time zone does cron use?

    Classic cron uses the time zone of the server. Many versions accept a CRON_TZ=Europe/Berlin line in the crontab. GitHub Actions schedules always run in UTC. Kubernetes CronJobs use the time zone of the controller unless you set spec.timeZone. Spring takes a zone attribute, and AWS EventBridge Scheduler has its own time zone setting. This page shows the next run times in any time zone you choose.

    What is the difference between 5, 6 and 7 field cron expressions?

    Five fields (minute hour day month weekday) is the standard used by crontab, GitHub Actions and Kubernetes. Spring adds a seconds field at the start, so it has six. Quartz also starts with seconds and can add a year at the end (six or seven fields), and counts the days of the week from 1 = Sunday instead of 0 = Sunday. AWS EventBridge has six fields without seconds but with a year at the end.

    Can cron run a job every 30 seconds?

    Not with standard crontab: the smallest unit is one minute. A common trick is two lines, * * * * * /path/to/job and * * * * * sleep 30; /path/to/job. A systemd timer (OnCalendar=*:*:0/30) or a scheduler with a seconds field, such as Spring (*/30 * * * * *) or Quartz (0/30 * * * * ?), can do it directly.

    More developer tools