CodeKitHub
Code Tools

Cron Expression Generator

Last updated:

A cron expression is a five-field string (minute, hour, day-of-month, month, day-of-week) that tells a scheduler like Unix cron, crontab, or a CI/CD pipeline exactly when to run a job — for example `*/15 9-17 * * MON-FRI` means "every 15 minutes, between 9am and 5pm, Monday through Friday." This tool works both directions: build a schedule using simple dropdowns and get the cron string, or paste an existing cron expression and instantly see a plain-English translation plus the next 5 times it will actually run. It follows the standard 5-field POSIX/Vixie cron syntax used by Unix, Linux crontab, and most job schedulers — see the crontab(5) man page for the canonical specification. Everything runs locally in your browser; nothing you type is uploaded anywhere.

Description
Next 5 runs
    Builder
    Minute
    Hour
    Day of month
    Month
    Day of week
    Syntax legend
    • * — any value
    • , — value list separator (e.g. 1,3,5)
    • - — range of values (e.g. 1-5)
    • / — step values (e.g. */15 = every 15)

    What Is This Tool?

    A cron expression is a compact, five-field schedule string — `minute hour day-of-month month day-of-week` — used by the Unix `cron` daemon and virtually every job scheduler modeled after it (crontab, Kubernetes CronJobs, GitHub Actions `schedule:`, Airflow, Jenkins). Each field accepts an asterisk (`*`, meaning "any value"), a specific number, a comma-separated list (`1,15,30`), a range (`9-17`), a step (`*/15`, meaning "every 15 units"), or — for month and weekday — a three-letter name (`JAN`, `MON`) instead of a number.

    The canonical definition of this syntax is the Linux crontab(5) man page, which documents the exact same five fields, special characters (`* , - /`), and the eight `@` shorthand strings (`@reboot`, `@yearly`/`@annually`, `@monthly`, `@weekly`, `@daily`/`@midnight`, `@hourly`) that most cron implementations, including Vixie cron (the version shipped on most Linux distributions), support as aliases for common schedules.

    This tool implements exactly that standard 5-field format — the format you'd put directly into `crontab -e` on a Linux or macOS server, or into a Kubernetes CronJob's `schedule:` field. It does not implement Quartz cron syntax, which is a different, 6-or-7-field format used by Java's Quartz Scheduler and by some vendor tools (see the comparison section below for when you need that instead).

    Why Use It?

    • You just inherited a production crontab with a line like `17 3 * * 0` and no comment explaining it — paste it here before you touch anything to see it's actually "every Sunday at 3:17am," not a typo.
    • You're writing a GitHub Actions workflow with a `schedule:` cron trigger and keep second-guessing whether `0 */6 * * *` really means every 6 hours starting at midnight — check the next 5 run times to confirm before committing the YAML.
    • You set up a cron job with both a day-of-month and a day-of-week restriction, like `0 4 8 * MON`, and the job is firing on days you didn't expect — this tool surfaces the OR-not-AND union behavior that trips up almost everyone the first time.
    • You're building a Kubernetes CronJob and need the exact `schedule:` string for "every 15 minutes, business hours only, weekdays" without hand-counting fields — use the dropdown builder instead of writing it by hand.
    • You're not sure if a scheduler config uses standard cron or Quartz cron because the docs just say "cron expression" — check whether it has 5 fields (this tool) or 6-7 fields with `?`/`L`/`W`/`#` characters (Quartz) before you waste time debugging a format mismatch.
    • 100% client-side: your schedule logic never leaves your browser.

    How to Use

    1. To translate an expression: type or paste a 5-field cron string (or an @shorthand like `@daily`) into the input field.
    2. Read the plain-English description and the next 5 computed run times below it — both update live as you type.
    3. To build one instead: open the Builder section, pick a mode (every / every N / specific value) for each of the five fields, and click "Generate expression."
    4. The generated expression fills the input field above and immediately feeds back into the description and next-run-times panels.
    5. Use the syntax legend at the bottom as a quick reference for `*`, `,`, `-`, and `/`.
    6. Copy the final expression with the Copy button and paste it into your crontab, CI config, or scheduler.

    Example

    Input

    */15 9-17 * * MON-FRI

    Output

    At 09:00, 09:15, 09:30, 09:45, 10:00 ... 17:45, on Monday, Tuesday, Wednesday, Thursday, Friday

    This expression runs every 15 minutes, but only within the 09:00–17:59 hour range, and only on weekdays — a typical "business hours" polling schedule.

    Standard cron vs Quartz cron

    "Cron syntax" isn't a single universal standard — the two formats you'll run into most often differ in field count and in what a few special characters mean. Use this table to confirm you're using the right one for your target scheduler.

    AspectStandard cron (this tool)Quartz cron
    Field count5 (minute hour dom month dow)6 or 7 (adds seconds, and optional year)
    Used byLinux/macOS crontab, Kubernetes CronJob, GitHub ActionsJava Quartz Scheduler, some enterprise schedulers
    Day-of-month + day-of-week both setMatches EITHER (union/OR)Requires `?` in one of the two fields — cannot set both to a value simultaneously
    Special extra charactersNone beyond `* , - /`Adds `?`, `L` (last), `W` (nearest weekday), `#` (nth weekday of month)
    Seconds-level schedulingNot supportedSupported (first field)

    Common schedule recipes

    A handful of expressions cover most real-world scheduling needs — these are worth recognizing on sight instead of re-deriving each time.

    • `*/5 * * * *` — every 5 minutes, all day. Common for health checks and lightweight polling jobs.
    • `0 */6 * * *` — every 6 hours, on the hour (00:00, 06:00, 12:00, 18:00). A frequent default for periodic sync or cleanup tasks.
    • `0 2 * * *` — once a day at 2am. The classic slot for nightly backups, when traffic is lowest.
    • `0 9 * * 1-5` — 9am, Monday through Friday only. Standard for business-hours-only reports or digests.
    • `0 0 1 * *` — midnight on the 1st of every month, equivalent to the `@monthly` shorthand. Used for monthly billing runs or usage resets.
    • `*/15 9-17 * * MON-FRI` — every 15 minutes, but only during business hours on weekdays — combines a step, a range, and a weekday range in one expression.

    Related tools

    Working with configs, schedules or timestamps? These tools pair well with the cron generator.

    Timestamp Converter · World Clock Converter · Date Calculator

    Frequently Asked Questions

    What is a cron expression?

    A cron expression is a 5-field text string (`minute hour day-of-month month day-of-week`) that specifies a recurring schedule for the Unix `cron` daemon and compatible schedulers. Each field can be `*` (any value), a number, a comma-separated list, a range (`a-b`), or a step (`*/n`); month and weekday fields also accept three-letter names like `JAN` or `MON`. The full specification is documented in the crontab(5) man page.

    What happens when both day-of-month and day-of-week are restricted?

    This is a well-known cron gotcha: per POSIX cron semantics, when BOTH the day-of-month and day-of-week fields are restricted (not `*`), a job runs if EITHER condition is met — it's a union (OR), not an intersection (AND). For example, `0 4 8 * MON` runs at 4am both on the 8th of every month AND on every Monday, not only on Mondays that happen to fall on the 8th. This tool implements that exact union behavior when computing next-run times.

    Standard cron vs Quartz cron — which one do I need?

    This tool generates standard 5-field POSIX/Vixie cron syntax — the format used by Linux/macOS `crontab`, Kubernetes CronJobs, GitHub Actions `schedule:`, and most Unix-derived job runners. Quartz cron, used by Java's Quartz Scheduler and by tools built on it (some enterprise schedulers, older Spring Batch configs), is a different 6-or-7-field format that adds a leading seconds field and swaps the meaning of some special characters (`?` for "no specific value" in day fields, `L`/`W`/`#` for "last day," "weekday nearest," and "nth weekday of month"). If your scheduler's field count is 6 or 7, or your documentation mentions `?`, `L`, `W`, or `#`, you need a Quartz-specific tool — expressions from this generator will not parse correctly there. If it's exactly 5 fields (or an `@daily`-style shorthand), you're in the right place.

    What do the @yearly, @monthly, @weekly, @daily and @hourly shortcuts mean?

    These are non-standard but widely supported shorthand strings that expand to common 5-field expressions: `@yearly`/`@annually` = `0 0 1 1 *` (once a year, Jan 1st at midnight), `@monthly` = `0 0 1 * *` (1st of every month at midnight), `@weekly` = `0 0 * * 0` (every Sunday at midnight), `@daily`/`@midnight` = `0 0 * * *` (every day at midnight), `@hourly` = `0 * * * *` (top of every hour). This tool parses all of them and treats them exactly as their expanded 5-field equivalent.

    Can I use day/month names instead of numbers?

    Yes. The month field accepts three-letter names `JAN` through `DEC`, and the day-of-week field accepts `SUN` through `SAT` (case-insensitive), interchangeably with numbers. Day-of-week numbers run 0–6 with 0 = Sunday; some implementations also accept 7 for Sunday, which this tool normalizes to 0. Ranges and lists work with names too, e.g. `MON-FRI` or `JAN,JUN,DEC`.

    Is my cron expression sent to a server?

    No. Parsing, the plain-English description, and the next-run-time computation all happen locally in JavaScript in your browser. Nothing you type or generate ever leaves your device.

    What timezone are the next-run-times calculated in?

    This tool computes next-run times using your browser's local timezone, since standard cron itself has no built-in timezone field — the actual daemon or scheduler running your job uses whatever timezone its host system (or, for GitHub Actions and similar cloud schedulers, UTC) is set to. If your server's timezone differs from your browser's, mentally shift the displayed times, or check your scheduler's timezone configuration separately.

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

    Standard 5-field cron has no direct "last day of month" syntax — that's one of the features Quartz cron adds with its `L` character. In standard cron, the common workaround is scheduling the job for the 28th–31st every day (`0 0 28-31 * *`) and having the script itself check if tomorrow's date rolls over to a new month before actually running its logic.

    Can I schedule something to run at an odd interval, like every 10 minutes?

    Yes, using the step syntax: `*/10 * * * *` runs every 10 minutes starting from :00 (so at :00, :10, :20, :30, :40, :50). Keep in mind steps always start counting from the field's minimum value, so `*/10` in the minute field will never land on :05 or :15 — if you need an offset like that, use an explicit comma list instead, e.g. `5,15,25,35,45,55`.

    Why does my cron job seem to run twice at once, or not at all, around a daylight saving time change?

    Standard cron schedules against wall-clock time on the host system, and DST transitions create either a skipped hour (spring forward) or a repeated hour (fall back). A job scheduled during the skipped or repeated hour can run zero or two times that day depending on your cron daemon's specific handling. Running critical infrastructure jobs on servers set to UTC (which has no DST) avoids this entirely.

    Related Tools