Cron Expression Generator & Crontab Builder
Generate a cron expression from a preset or type your own, and this cron builder translates it into plain English and lists the next run times. Use it as a crontab generator for Linux, or as the starting point for GitHub Actions, Kubernetes and AWS schedules (conversion notes below).
Runs in your browser — nothing is uploaded.Expressions are parsed on your device with cron-parser and cronstrue.
Every 15 minutes
*/15
Minute
0–59
*
Hour
0–23
*
Day
1–31
*
Month
1–12
*
Weekday
0–6
Presets
*Any value*/nEvery n units (e.g. */5 = every 5)nExact value (e.g. 3 = at 3)n-mRange (e.g. 1-5 = Mon to Fri)n,mList (e.g. 1,3,5 = Mon, Wed, Fri)?No specific value (day/weekday only)How to generate a cron expression
- Start from the closest preset (every 15 minutes, daily at midnight, weekdays at 9am…) or type five fields into the input.
- Edit one field at a time and watch the plain-English description. If it says something you didn't mean, the field order is usually the culprit: minute hour day-of-month month day-of-week.
- Check the next run times. They are the fastest way to catch a schedule that is correct on paper but wrong in practice.
- Copy the expression and adapt it to your scheduler using the table below.
Worked example: a weekday backup at 02:30
30 2 * * 1-5 │ │ │ │ └── day of week: Monday to Friday │ │ │ └────── month: every month │ │ └────────── day of month: every day │ └────────────── hour: 2 (2 AM) └─────────────────── minute: 30 → "At 02:30 AM, Monday through Friday" # crontab -e 30 2 * * 1-5 /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1
Change 1-5 to * to run daily, or 2 to */6 to run every six hours (00:30, 06:30, 12:30, 18:30). More ready-made schedules are in cron expression examples.
Using the expression in crontab, GitHub Actions, Kubernetes and AWS
The same schedule — 02:30 on weekdays — written for each platform:
| Platform | Syntax | Watch out for |
|---|---|---|
| Linux crontab / cron.d | 30 2 * * 1-5 | 5 fields, server local time (or CRON_TZ). /etc/cron.d adds a user column. |
| GitHub Actions | on: schedule: - cron: '30 2 * * 1-5' | 5 fields, always UTC. Runs can start several minutes late under load. |
| Kubernetes CronJob | schedule: "30 2 * * 1-5" | 5 fields. Set spec.timeZone (e.g. Europe/Madrid) or it uses the controller's zone. |
| AWS EventBridge | cron(30 2 ? * MON-FRI *) | 6 fields with year at the end; ? required in day-of-month or day-of-week. |
| Quartz / Spring @Scheduled | 0 30 2 ? * MON-FRI | Seconds field first. Spring accepts * instead of ?; Quartz requires ?. |
This builder validates the standard five-field format. For 6-field Quartz or AWS expressions, build the five standard fields here and add the extra field by hand.
Common cron mistakes
* 2 * * *instead of0 2 * * *— the first runs every minute from 02:00 to 02:59 (60 times). Always set the minute.- Steps that don't divide evenly —
*/7in the minute field runs at :00, :07 … :56 and then :00 again, a 4-minute gap. Steps restart every hour; they are not a true "every N minutes" timer. - Day-of-month and day-of-week together —
0 9 1 * 1runs on the 1st and on every Monday, not on Mondays that fall on the 1st. - Unescaped
%— in a crontab line,%means newline.date +%Fmust be writtendate +\%F. - Assuming local time — GitHub Actions and EventBridge rules are UTC; a "9 AM" job in Madrid is
0 7 * * *in summer and0 8 * * *in winter.
For a field-by-field explanation of the syntax, special characters and @daily-style shortcuts, read the complete cron expression guide.
Learn more
Cron Syntax Explained: */15 * * * * and Other Examples
Understand cron syntax with real examples. Learn how to schedule jobs with minute, hour, day, month, and weekday fields — with a handy reference table.
Cron Every 5 Minutes, Hourly, Daily: Copy-Paste Examples
Copy-paste cron expressions for every common schedule: every minute, every hour, weekdays only, first of the month, business hours, and more — with a field-by-field reference.
Related Tools
Frequently Asked Questions
What are the five fields in a standard cron expression and what values does each accept?▾
A standard cron expression has five space-separated fields: minute (0–59), hour (0–23), day-of-month (1–31), month (1–12 or JAN–DEC), and day-of-week (0–7, where both 0 and 7 are Sunday, or SUN–SAT). Special characters: * means every value, , separates a list (1,3,5), - defines a range (1-5), / defines a step (*/15 means every 15 units). Standard Unix cron has no seconds field; the smallest unit is one minute.
How do I turn a generated cron expression into a crontab entry?▾
Run crontab -e and add one line: the five-field expression, a space, then the command. For example: 30 2 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1. Use absolute paths, because cron runs with a minimal PATH, and redirect output so failures are visible. System-wide files in /etc/cron.d/ use the same format with an extra user column between the schedule and the command.
How do I generate a cron expression for AWS EventBridge?▾
Build the schedule here with the standard five fields, then convert it: EventBridge uses cron(minutes hours day-of-month month day-of-week year), adds a year field (usually *), and requires ? in either day-of-month or day-of-week. So 0 12 * * 1-5 (weekdays at noon) becomes cron(0 12 ? * MON-FRI *). Day-of-week in EventBridge is 1–7 with 1 = Sunday, so prefer names (MON-FRI) to avoid off-by-one errors. Schedules run in UTC unless you use EventBridge Scheduler with a time zone.
What time zone does a cron expression use?▾
The expression itself has no time zone — the scheduler decides. Classic cron uses the server's local time (often UTC on cloud VMs); some implementations support a CRON_TZ= line. GitHub Actions and AWS EventBridge rules use UTC. Kubernetes CronJobs use the controller's time zone unless you set spec.timeZone. The next run times on this page are shown in your browser's local time zone, so double-check if your server runs in UTC.
Why is my cron job not running?▾
The usual causes, in order: the command works in your shell but not under cron's minimal environment (missing PATH or env vars — use absolute paths); an unescaped % in the command, which crontab treats as a newline (write \%); the file in /etc/cron.d/ has a dot in its name or is missing the user column; the server's time zone isn't what you assumed; or the script isn't executable. Check the cron log (journalctl -u cron or /var/log/syslog) to see whether the job started at all.
What is the difference between cron in Linux/Unix, Quartz Scheduler, and AWS EventBridge?▾
They are not interchangeable. Standard Unix/Linux cron uses 5 fields. Quartz Scheduler (Java) adds a mandatory seconds field at the beginning (6 fields total), and day-of-week uses 1–7 where 1 = Sunday. AWS EventBridge cron also uses 6 fields but adds a year field at the end (not seconds), requires either day-of-month or day-of-week to be ? (not both specified), and runs in UTC only. Pasting a 6-field Quartz expression into a Unix crontab is one of the most frequent scheduling bugs.
Does cron support running a job every 30 seconds?▾
Standard Unix cron cannot — its minimum resolution is one minute. To approximate every-30-seconds execution, a common workaround is two crontab entries: one at the start of the minute and one with sleep 30; before the command. For true sub-minute scheduling, use Quartz Scheduler (has a seconds field), systemd timers on Linux (support seconds-level OnCalendar schedules), or an application-level scheduler library in Node.js or Python that operates in-process.
When both day-of-month and day-of-week are specified, does cron use AND or OR logic?▾
In standard Unix cron, if both fields are specified (neither is *), the job runs when either condition is true — OR logic. This surprises many developers who expect AND behavior. For example, 0 0 1 * 1 runs at midnight on both the 1st of every month AND every Monday, not only on Mondays that are the 1st. To achieve AND logic (first Monday of the month), you need to use day-of-month with shell logic inside the command to check the day of the week.
What happens when a cron job is scheduled for a day that doesn't exist, like February 30?▾
In standard Unix cron, a day-of-month value that never occurs in a given month (like 31 in a 30-day month, or 29–31 in February) is silently skipped — the job simply doesn't run that month with no error. There is no exception thrown. This means a job scheduled for the 31st only runs in January, March, May, July, August, October, and December. For reliable month-end jobs, use 28 to guarantee execution every month, or combine with shell logic to detect the last day.