GALAXY OF TOOLS

DEV SECTOR

Cron Expression Generator

Build or decode a cron schedule, read it in plain English and see the next 10 run times.

—
Quick presets

Build it field by field


Next 10 run times


    Common cron examples

    ExpressionRunsLoad
    */10 * * * *Every 10 minutes
    0 */6 * * *Every 6 hours, on the hour
    0 9-17 * * 1-5On the hour from 09:00 to 17:00, Monday to Friday
    30 2 * * *Every night at 02:30
    0 8 * * 1Every Monday at 08:00
    0 22 * * 1-5Weeknights at 22:00
    0 10 * * 6,0Weekends at 10:00
    0 0 1,15 * *Midnight on the 1st and 15th
    0 6 1 */3 *06:00 on the first day of every quarter
    15 14 1 * *14:15 on the first of every month
    0 0 13 * 5Every 13th and every Friday (OR rule)
    @rebootOnce, when the cron daemon starts

    Runs entirely in your browser. Nothing you enter or upload is sent to a server.

    Cron expression generator and explainer

    The cron expression generator builds a cron schedule from simple choices — every 15 minutes, weekdays at 09:30, the first day of every month — and explains any existing expression in plain English. Type or paste an expression, or build it field by field; both views stay in sync, and the next ten run times are calculated instantly in your local time or in UTC.

    It is made for developers, DevOps engineers and sysadmins writing crontab entries, Kubernetes CronJobs, GitHub Actions schedules, Spring @Scheduled annotations or Quartz triggers. The run-time preview uses the same rules as the cron daemon on most Linux servers (Vixie cron and cronie), including the easily missed rule for combining day of month with day of week, so you see when a job will really fire.

    How to use the Cron Expression Generator

    1. Pick the format: Standard (5 fields) for crontab, Kubernetes and GitHub Actions, With seconds (6 fields) for Spring and node-cron, or Quartz.
    2. Click a quick preset such as “Every 15 minutes” or “Weekdays 09:30”, or type an expression into the box.
    3. Fine-tune any field in “Build it field by field”: every value, every N, a range, specific values or a custom value such as 0-20/2.
    4. Read the plain-English description and check the next 10 run times. Switch the time zone between local time and UTC, or set “Show runs after” to preview a future date.
    5. Press “Copy” and paste the expression into your crontab, YAML file or code.

    Cron Expression Generator features

    Two-way editing

    Edit the expression and the builder follows; change the builder and the expression is rewritten.

    Plain-English meaning

    Every valid expression becomes a sentence such as “At 09:30 on Monday through Friday”.

    A real cron matcher

    Next run times honour month lengths, leap years, the day-of-month/day-of-week OR rule, the asterisk quirk and daylight-saving gaps.

    Three dialects

    Standard 5-field crontab, 6-field with seconds, and Quartz with ?, L, W, # and an optional year.

    Specific error messages

    Out-of-range values, ranges written backwards, the wrong number of fields and unsupported symbols are each explained in plain words.

    Macros understood

    @hourly, @daily, @weekly, @monthly, @yearly and @reboot are expanded and described.

    Cron syntax at a glance

    A standard cron expression has five fields separated by spaces: minute, hour, day of month, month and day of week. Inside a field, * means any value, a comma builds a list (1,15), a hyphen builds a range (9-17) and a slash adds a step (*/10 is every tenth value, 0-20/2 is every second value from 0 to 20). Months and weekdays also accept names such as MON-FRI.

    FieldAllowed valuesExample
    Minute0–59*/15 = 0, 15, 30, 45
    Hour0–239-17 = 9 am to 5 pm
    Day of month1–311,15 = 1st and 15th
    Month1–12 or JAN–DEC*/3 = Jan, Apr, Jul, Oct
    Day of week0–7 or SUN–SAT (0 and 7 = Sunday)1-5 = Monday to Friday

    The day-of-month and day-of-week rule

    This is the most common cron surprise. When both day fields are restricted, cron runs on days that match either of them. 0 0 13 * 5 therefore runs on every 13th and on every Friday — not only on Friday the 13th. When either day field is *, only the other one matters.

    There is a twist in Vixie cron and cronie, the daemons behind most Linux crontabs: a field counts as “unrestricted” whenever it starts with an asterisk, so 0 0 */2 * 1 runs only on Mondays that are odd-numbered days. Spring requires both fields to match, and Quartz refuses expressions that set both, which is why Quartz uses ? for “no specific value”. The generator warns you when these rules apply.

    Cron flavours compared

    • Linux crontab (cronie, Vixie cron): 5 fields, minute resolution, the job runs in the server’s time zone unless the crontab sets CRON_TZ.
    • Kubernetes CronJob: the same 5-field syntax plus macros like @hourly; set spec.timeZone to pin a time zone.
    • GitHub Actions: 5 fields, always evaluated in UTC, and the shortest supported interval is every 5 minutes.
    • Spring and node-cron: an extra seconds field at the start. Spring also accepts L, W and #.
    • Quartz: seconds first, an optional year last, weekdays numbered 1 (Sunday) to 7 (Saturday), and ? required in one day field. AWS EventBridge has its own six-field format with a year.

    Tips for reliable cron jobs

    • Run servers in UTC, or avoid 01:00–03:00 local time, when daylight-saving changes can skip or repeat a run.
    • Use absolute paths and set PATH at the top of the crontab — cron starts jobs with a minimal environment.
    • Escape percent signs as \% in a crontab command line; an unescaped % is treated as a newline.
    • Send output to a log with >> /var/log/job.log 2>&1, and wrap long jobs in flock so a slow run cannot overlap the next one.

    Cron Expression Generator FAQ

    What is a cron expression?

    A cron expression is a short string of five (or six) fields that describes a repeating schedule: minute, hour, day of month, month and day of week. Cron starts the job whenever the current time matches. Paste any expression into this cron expression generator to see what it means.

    How do I run a cron job every 5 minutes?

    Use */5 * * * *. The */5 step in the minute field matches minutes 0, 5, 10 … 55 of every hour. For every 5 minutes during office hours on weekdays, use */5 9-17 * * 1-5.

    What does 0 0 * * * mean?

    It runs once a day at midnight (00:00) in the time zone of the machine running cron. It is the same as the @daily and @midnight macros.

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

    You probably set both the day-of-month and the day-of-week fields. Cron combines them with OR, so 0 9 1 * 1 runs on the 1st of every month and on every Monday. Set one of the two fields to * if you want only one condition.

    Does cron use my local time or UTC?

    Cron uses the system time zone of the server it runs on, which is often UTC in the cloud. Cronie can override it per crontab with CRON_TZ, Kubernetes with spec.timeZone, and GitHub Actions always uses UTC. Switch the run-time preview to UTC to check.

    How do I schedule a job on the last day of the month?

    Standard cron has no symbol for it. A common trick is 0 23 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /path/to/job, which only continues when tomorrow is the 1st. Quartz and Spring support L directly, for example 0 0 23 L * ?.

    Can cron run a job every 30 seconds?

    Not with a standard crontab, whose smallest unit is one minute. Schedulers with a seconds field accept */30 * * * * *; on plain cron, add a second entry prefixed with sleep 30;.

    You might also need