ToolNook

Cron Expression Generator

Build a cron schedule with dropdowns and see it explained in plain English.

Cron expression

* * * * *

Next 5 run times (your local time)

    Common schedule presets

    How a cron expression is structured

    A standard Unix cron expression is five space-separated fields, always in the same order:

    ┌─ minute (0-59)
    │ ┌─ hour (0-23)
    │ │ ┌─ day of month (1-31)
    │ │ │ ┌─ month (1-12)
    │ │ │ │ ┌─ day of week (0-6, 0 = Sunday)
    │ │ │ │ │
    * * * * *

    Each field accepts four things. * means every value. A single number pins one value (30 in the minute field). A comma lists several (0,15,30,45). A hyphen gives an inclusive range (1-5 in the day-of-week field is Monday through Friday). A slash adds a step, so*/10 means "every 10th value starting from the lowest" and 0-30/5 means minute 0, 5, 10, 15, 20, 25 and 30. Steps and ranges combine, which is where most hand-written expressions go wrong.

    Worked example: 30 2 * * 1-5 reads right to left as "Monday through Friday, any month, any day of the month, at hour 2, minute 30" — a backup that runs at 02:30 on weekdays only. Change the minute field to */30 and you get */30 2 * * 1-5, which fires twice, at 02:00 and 02:30, on those same weekdays. The next-run list above is the fastest way to confirm you got it right: it simulates the schedule minute by minute for the next year rather than guessing from the text.

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

    The one rule that surprises almost everybody: when both the day-of-month and the day-of-week field are set to something other than *, cron combines them with OR, not AND. So0 0 13 * 5 does not mean "Friday the 13th" — it means "the 13th of every month, and also every Friday", which fires roughly 60 times a year instead of once or twice. If you need both conditions, leave one field as * and check the other inside your script. This tool applies the same OR rule when listing the next runs, so the preview matches what your server will actually do.

    Tips for schedules that behave in production

    • Know your time zone. Cron uses the clock of the machine or container it runs on, which is usually UTC on a server. The run times listed above are in your browser's time zone — compare the two before scheduling anything that has to happen at a specific local hour.
    • Avoid minute 0. Everyone schedules on the hour, so 0 * * * * lands your job in the busiest minute on shared infrastructure. An off-beat minute like 7 * * * * spreads load and makes your job's logs easier to find.
    • Watch out for 2am. On daylight-saving changeover days a job scheduled between 02:00 and 03:00 can run twice or not at all, depending on the platform. Schedule anything critical outside that hour.
    • Days 29-31 skip months. 0 0 31 * * only fires in the seven months that have a 31st. For "last day of the month", run daily and let the script check the date, or use a scheduler that supports the L character (Quartz does; standard Unix cron does not).
    • Five fields, not six. Quartz (used by Spring and many Java schedulers) puts a seconds field first and an optional year field last, so a six- or seven-field expression copied from a Quartz example will be rejected by crontab. This generator produces standard five-field Unix cron, which is what crontab, Kubernetes CronJobs, GitHub Actions and most CI systems expect.

    Cron Expression Generator: frequently asked questions

    What is a cron expression?

    A cron expression is a five-field string (minute, hour, day of month, month, day of week) that tells a scheduler such as crontab, Jenkins or Kubernetes when to run a job.

    Does this generator support seconds or year fields?

    This tool generates standard five-field Unix cron expressions. Quartz and Spring six- or seven-field formats are not supported yet.

    How do I run a job every 15 minutes?

    Use */15 * * * *. The */15 in the minute field means every 15 minutes starting at minute 0.

    What does * mean in a cron expression?

    An asterisk means "every valid value for this field". So * in the hour field means every hour, and * * * * * means every minute of every hour of every day. A comma lists specific values (0,30), a hyphen gives a range (1-5), and a slash sets a step (*/10).

    What time zone does cron use?

    A crontab entry runs in the time zone of the machine or container running it, which is often UTC on a server even when you are not. The next-run times shown here are rendered in your own browser time zone, so compare them against your server clock before trusting a schedule that is sensitive to the hour.

    Why does day of month and day of week together behave oddly?

    When both the day-of-month and day-of-week fields are set to something other than *, Unix cron treats them as OR, not AND — the job runs if either matches. 0 0 13 * 5 fires on the 13th of the month AND on every Friday, not only on Friday the 13th. This generator uses the same OR rule when it lists the next run times.

    How do I schedule a job at midnight on the first of every month?

    Use 0 0 1 * * — minute 0, hour 0, day of month 1, every month, any weekday. The presets above include this one along with hourly, daily, weekday-only and yearly schedules.