Cron Expression Generator

Built and verified by pengchun · Last reviewed · How we verify

Build and read cron expressions in plain English. Pick minute, hour, day, month and weekday, then copy the crontab line and see the next run times.

0-59
0-23
1-31
1-12 or names
0-6 or names
*/5 * * * *

NEXT RUNS (YOUR LOCAL TIME)

    Cron expressions are five fields of time

    A cron expression is a five-field shorthand that tells a Unix or Linux scheduler when a job should run. Each field is separated by a space, and together they describe one recurring moment: which minute, which hour, which day of the month, which month and which day of the week.

    The fields always appear in the same order, which is why a cron line is often written as minute hour day-of-month month day-of-week. Get the order wrong and the job quietly runs at the wrong time, so it is worth building the expression instead of guessing at it.

    Cron field order and accepted values

    FieldAllowed valuesSpecial characters
    Minute0-59* , - /
    Hour0-23* , - /
    Day of month1-31* , - /
    Month1-12 or jan-dec* , - /
    Day of week0-6 or sun-sat (0 and 7 are Sunday)* , - /

    The four special characters do most of the work. An asterisk means every value, a comma builds a list such as 1,15, a hyphen builds a range such as 1-5, and a slash adds a step so */5 means every fifth value counted from the start of the field.

    Common cron expressions

    ExpressionMeaning
    */5 * * * *Every 5 minutes
    0 * * * *Every hour, on the hour
    0 0 * * *Every day at midnight
    30 2 * * *Every day at 02:30
    0 9 * * 1-5Weekdays at 09:00
    0 0 1 * *Midnight on the first day of every month
    0 4 * * 0Every Sunday at 04:00
    0 0 1 1 *Once a year, on January 1

    Reading the next run times

    1. Pick a preset to start from a schedule you already recognise, or type straight into the five fields.
    2. Press Build expression. Every field is validated and any field that cannot be parsed is called out by name.
    3. Read the plain-English summary and the next five run times in your own local time zone.
    4. Copy the crontab line, paste it into crontab -e, and append the command you want to run.

    Cron tips and gotchas

    Two timing problems are worth their own paragraph, because both look like a broken schedule when they are not. Cron reads the clock of the machine it runs on, so a job set for 02:30 can skip a day or run twice on the morning a region changes its clocks — the daylight saving time calculator lists those dates and shows the offset either side of them. And when you are matching a schedule against log lines, remember that logs are usually written in UTC while the schedule is local: the timestamp converter turns one into the other so the two can be compared.

    FAQ

    What does */5 mean in cron?

    It means every fifth value. In the minute field */5 runs the job at minutes 0, 5, 10, 15 and so on up to 55, so it fires twelve times an hour. The step always counts from the start of the field rather than from the previous run.

    Why is my cron job not running when I expect?

    The usual causes are the day-of-month and day-of-week OR rule, a server time zone that differs from yours, and a command that needs its full path. Build the expression here, check the next run times, and confirm the schedule you pasted is the schedule you generated.

    Does cron use five fields or six?

    The classic Unix crontab uses five fields, starting with minutes. Quartz-style schedulers add a leading seconds field, which makes six or seven fields in total. This generator produces the standard five-field format used by crontab -e on Linux and macOS.

    ← Back to all tools