~/cron-generator

Cron Generator

Build, validate, and read cron expressions in plain English. Preview the next 5 run times before you commit. Presets for the most common schedules.

cron expression
0
minute
0-59
9
hour
0-23
*
day
1-31
*
month
1-12
1-5
weekday
0-6 (sun-sat)
// means

At 09:00, on weekdays.

next 5 runslocal time
Wed, Apr 29, 2026, 09:00 AMin 19h
Thu, Apr 30, 2026, 09:00 AMin 2 days
Fri, May 1, 2026, 09:00 AMin 3 days
Mon, May 4, 2026, 09:00 AMin 6 days
Tue, May 5, 2026, 09:00 AMin 7 days
// presets
// syntax cheatsheet+
*any value
,value list separator (e.g. 1,15,30)
-range of values (e.g. 9-17)
/step values (e.g. */15 = every 15)
@hourlynamed alias (also @daily, @weekly, @monthly, @yearly)
examples: */5 * * * * every 5 min, 0 0 * * 0 Sundays midnight, 0 9 * * 1-5 weekdays at 9am
// how to use

Build a cron expression with confidence.

  1. 01Start from a preset or type your expression.The preset grid covers the most common schedules: every X minutes, daily at a fixed time, weekdays only, monthly, etc. Click one to load it, then tweak the fields.
  2. 02Read the plain-English description.The tool translates your expression into a sentence so you can verify your intent. If you wrote */5 * * * 1-5 but meant 0 9 * * 1-5, the description tells you immediately.
  3. 03Check the next 5 run times.The preview shows when your job will fire next, in your local timezone. This catches subtle bugs that the description might miss — like a schedule that fires once a year by mistake.
// background

How does cron work?

Cron is the time-based job scheduler that has run on Unix systems since the late 1970s. A cron expression describes a recurring schedule using five space-separated fields: minute, hour, day of month, month, and day of week. The cron daemon wakes up every minute, finds the jobs whose schedule matches the current time, and runs them.

The expression 0 9 * * 1-5 reads as at minute 0, of hour 9, every day of every month, on weekdays Monday through Friday. In plain English: every weekday at 9:00 AM.

The five fields

minute0–59Which minute of the hour
hour0–23Which hour of the day (24h)
day1–31Which day of the month
month1–12Which month of the year
weekday0–6Sunday=0, Monday=1, ..., Saturday=6

Special syntax

  • *any value (every minute, every hour, etc.)
  • ,list of values: 1,15,30 means at minute 1, 15, and 30
  • -range: 1-5 means 1, 2, 3, 4, 5
  • /step: */15 means every 15 (starting from 0)
  • @hourlynamed alias for 0 * * * *
  • @dailynamed alias for 0 0 * * *
  • @weeklynamed alias for 0 0 * * 0
  • @monthlynamed alias for 0 0 1 * *

Where you'll see cron expressions

  • Linux crontab files (/etc/crontab, /etc/cron.d/, user crontabs)
  • Kubernetes CronJob resources (.spec.schedule)
  • GitHub Actions workflows (on.schedule[].cron)
  • GitLab CI scheduled pipelines
  • AWS EventBridge rules and Lambda scheduled triggers
  • systemd timer units (with OnCalendar conversion)
  • Most CI/CD platforms, monitoring tools, and job queues

Common pitfalls

  • ×Confusing * (every minute) with 0 (once per hour at :00)
  • ×Forgetting that cron runs in UTC by default on most servers
  • ×Assuming */7 means 'every 7 minutes' — it doesn't, it leaves a gap
  • ×Setting both day-of-month and day-of-week (they OR, not AND)
  • ×Expecting subprocess PATH to be the same as your shell's
  • ×Not redirecting output, so failures get silently emailed to root
// faq

Frequently asked questions.

Why is my cron job never running?+
The most common causes: an invalid expression (use this tool to validate), the daemon isn't installed or isn't running (cron, crond, systemd-cron), the script doesn't have execute permissions, the script needs absolute paths because PATH is minimal in cron's environment, or the script's output is failing silently because cron sends it to email by default. Check /var/log/cron or systemd journals.
What's the difference between * and 0 in the minute field?+
* means 'every minute' — the job runs 60 times per hour. 0 means 'at minute 0 of the hour' — the job runs once per hour, exactly when the clock hits :00. Confusing them is the most common cron mistake.
How do I run a job every X minutes?+
Use the step syntax: */X in the minute field. For example, */5 * * * * runs every 5 minutes. */15 * * * * runs every 15 minutes. Be careful: */7 doesn't quite mean 'every 7 minutes' — it runs at 0, 7, 14, 21, 28, 35, 42, 49, 56 then jumps back to 0 at the next hour, leaving a 4-minute gap.
What about seconds? Can cron run a job every 30 seconds?+
Standard Unix cron has only 5 fields and the minimum granularity is 1 minute. Some flavors (Quartz, Spring, AWS EventBridge) support a 6-field format with seconds, but they're not POSIX cron. If you need sub-minute scheduling, use a different scheduler (a long-running script, systemd timers with OnCalendar, or a job queue).
Do I use 0 or 7 for Sunday in the weekday field?+
Both work. The original POSIX spec uses 0 for Sunday. Many implementations also accept 7 for Sunday to make ranges like 1-7 (Mon-Sun) more intuitive. This tool accepts both and normalizes to 0.
What happens when day-of-month and day-of-week are both restricted?+
Quirky cron behavior: when both fields are not '*', most implementations use OR logic — the job runs if either condition matches. So '0 0 1 * 1' runs at midnight on the 1st of every month AND every Monday, not just on Mondays that fall on the 1st. This tool follows the same OR logic in its next-run preview.