Cron Expression Generator
- Runs on your device
- Nothing uploaded
- Free, no sign-up
Presets
Next runs
Five-field Unix cron
Classic cron uses five fields: minute, hour, day of month, month, day of week. This page helps you assemble those fields and preview upcoming runs in local browser time using a simple expander for common patterns.
Naming differs on some platforms (Quartz adds seconds). Confirm whether your scheduler wants five fields or six before you paste.
Worked example: reading three common expressions
0 9 * * 1-5 means 09:00 every weekday. */15 * * * * means every 15 minutes. 30 2 1 * * means 02:30 on the first day of each month.
When both day-of-month and day-of-week are restricted, Unix cron treats that as OR on many systems. Read your scheduler docs; behavior is a common source of surprises.
Limits
Next-run previews are best-effort in the browser and ignore DST edge cases some engines special-case. This tool does not install crontab entries or talk to servers.
Worked schedules you can reuse
15 6 * * 1-5 is 06:15 on weekdays. 0 0 1 1 * is midnight on January 1. 0 */6 * * * is every six hours on the hour. 30 2 * * 0 is 02:30 every Sunday. Write the human sentence next to the expression in your runbook so the next on-call engineer does not reverse the fields.
Field order from left to right is minute, hour, day of month, month, and day of week. Mixing up hour and minute is the most common paste error when copying from dashboards that show human clocks first.
Pitfalls
- Time zone. Cron runs in the server's time zone, often UTC. 6 AM UTC is not 6 AM in your city.
- Day of month and day of week together. In standard cron, if both are restricted the job runs when either matches, not both.
- Daylight saving. Jobs scheduled between 1 and 3 AM local time can be skipped or run twice on clock-change days.
- Five vs six fields. Quartz and some platforms add a seconds field. Check what your scheduler expects.
Parse cron and list next runs in code
Each snippet parses the 5-field expression */15 9-17 * * 1-5 (every 15 minutes, 9:00 to 17:45, Monday to Friday) and prints the next three runs in a named time zone.
JavaScript: cron-parser (v5)
import { CronExpressionParser } from "cron-parser"; // npm i cron-parser (v5)
const interval = CronExpressionParser.parse("*/15 9-17 * * 1-5", {
tz: "America/Los_Angeles", // cron has no time zone of its own
});
for (let i = 0; i < 3; i++) console.log(interval.next().toISOString());
Python: croniter
from datetime import datetime
from zoneinfo import ZoneInfo
from croniter import croniter # pip install croniter
start = datetime.now(ZoneInfo("America/Los_Angeles"))
it = croniter("*/15 9-17 * * 1-5", start)
for _ in range(3):
print(it.get_next(datetime).isoformat())
print(croniter.is_valid("61 * * * *")) # False: minute is 0-59
Go: github.com/robfig/cron/v3
package main
import (
"fmt"
"time"
"github.com/robfig/cron/v3" // go get github.com/robfig/cron/v3
)
func main() {
sched, err := cron.ParseStandard("*/15 9-17 * * 1-5") // 5-field Unix syntax
if err != nil {
panic(err)
}
loc, _ := time.LoadLocation("America/Los_Angeles")
t := time.Now().In(loc)
for i := 0; i < 3; i++ {
t = sched.Next(t)
fmt.Println(t.Format(time.RFC3339))
}
}
Each snippet was run on October 14, 2026 with cron-parser 5.10.2, croniter 6.2.4 and robfig/cron v3.0.1.
Cron syntax references
- POSIX: crontab: the five fields and their ranges
- crontab(5) Linux manual page: step values, names like mon, and the day-of-month or day-of-week rule
- cron-parser (JavaScript)
- croniter (Python)
- Go: robfig/cron v3
FAQ
Does the cron builder upload expressions?
No. Everything stays in the browser.
Five fields or six?
This page targets classic five-field Unix cron. Quartz-style seconds need a different format.
What does 1-5 in the weekday field mean?
Monday through Friday on systems where 0 or 7 is Sunday. Confirm your engine's weekday numbering.
Why is next-run wrong around DST?
Local previews can disagree with server TZ databases. Prefer scheduling in UTC when precision matters.
Is Sunday 0 or 7?
Most cron implementations accept both 0 and 7 for Sunday. Use 0 to be safe.
Why did my job not run on the 31st?
Months without a 31st skip that day. Use a last-day-of-month feature if your scheduler has one, or run daily and check the date in the script.