Cron Expression Generator

Build, validate, and visualize cron schedules with an intuitive interface. Generate standard 5‑field cron expressions (minute hour day month weekday), preview the next 5 runs in your local timezone, and get a human‑readable explanation. Ideal for Linux crontab, AWS CloudWatch Events, Kubernetes CronJobs, and workflow automation.

Minute (0‑59)
* , 0-59, */10, 0,15,30
Hour (0‑23)
* , 0-23, */3, 9-17
Day (1‑31)
* , 1-31, */5, L? use *
Month (1‑12)
* , 1-12, */2
Weekday (0‑7)
0‑7 (0,7 Sun) MON=1 ... SAT=6
Syntax support: Wildcard *, lists 1,2,3, ranges 1-5, steps */10 or 0-30/5. Day & Weekday: both non‑* => AND condition (both must match). Leave day as * if using weekday exclusively.
Edit directly or use the visual builder above — any change updates the schedule.
0 0 * * *
Next 5 execution times (local timezone)
Daily at 00:00
Loading preview...
Times are calculated based on your browser's local time zone. Maximum 5000 iteration steps to prevent infinite loops.
Every minute Every hour (minute 0) Daily at 09:00 Mondays at 12:00 1st of month at 08:30 Every 15 minutes Weekly on Sunday midnight Yearly on Jan 1st
Privacy first: All cron parsing and execution simulation runs locally in your browser. No data leaves your device.

Mastering Cron Syntax: From Novice to Expert

A cron expression is a string comprising five or six fields separated by whitespace that define the schedule for automated jobs. This generator focuses on the standard 5‑field cron (minute, hour, day of month, month, day of week) — the foundation of Linux crontab, Kubernetes CronJob, Airflow schedules, and countless automation frameworks. Understanding cron empowers engineers to orchestrate backups, data pipelines, system maintenance, and cloud functions with surgical precision.

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

Field Specification & Wildcards

  • * – any value (every minute, every hour, etc.)
  • */N – step values: */15 in minute field means every 15 minutes.
  • a,b,c – list: 1,15,30 in minute field = run at minute 1, 15 and 30.
  • a-b – range: 9-17 in hour field = hours 9 through 17 inclusive.
  • Combinations: 1-5,10,*/2 (valid within most cron implementations).

Why Cron is Indispensable in Modern DevOps

From rotating SSL certificates and log cleanup to triggering ETL jobs and sending daily reports, cron schedules run the invisible backbone of server operations. Major cloud providers (AWS EventBridge Schedules, Google Cloud Scheduler, Azure Functions) adopt cron syntax for serverless cron jobs. In data engineering, Apache Airflow’s schedule_interval uses cron, and Kubernetes' CronJob relies on it for batch processing. Mastering cron ensures you can design reliable, time‑triggered architectures without code changes.

Behind the Scenes: Cron Matching & Next Run Calculation

Our engine parses each cron field into a set of allowed values (using range, step, list expansion). Then it simulates time from the current minute onward, checking each minute whether all fields match. The algorithm respects month lengths, leap years, and day‑of‑week vs day‑of‑month constraints (both non‑wildcard require satisfaction). This provides accurate predictions up to 5 upcoming runs. Due to performance bounds, iterations are capped at 5000 steps — if you see fewer than 5 results, consider loosening constraints.

Real‑World Use Case: Database Backup Scheduler

A financial services firm needed to run incremental backups every 2 hours between 8 AM and 6 PM on weekdays, excluding midnight. Using 0 8-18/2 * * 1-5 (minutes = 0, hours = 8,10,12,14,16,18, any day/month, weekdays Mon‑Fri). Our generator validated the expression and displayed the next 5 runs, confirming that no backups happen after 6 PM. The team avoided costly misconfigurations and met compliance requirements.

Kubernetes CronJob – Real‑World YAML

A team needed to run a data cleanup job every weekday at 2:30 AM, but skip the first day of each month. The expression 30 2 * * 1-5 runs Mon‑Fri at 02:30. To exclude the 1st day, they used day-of-month and weekday together: 30 2 2-31 * 1-5 (runs only when day ≥ 2 AND Mon‑Fri). Our generator confirmed the next 5 runs avoid March 1st.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: cleanup
spec:
  schedule: "30 2 2-31 * 1-5"   # validated by this tool

Common Pitfalls & Pro Tips

  • Day of month vs Weekday: When both are specified (not *), the job runs only when both conditions are true. To avoid confusion, keep one as * unless you intend the intersection.
  • Weekday numbers: 0 = Sunday, 1 = Monday ... 6 = Saturday, 7 = Sunday (redundant).
  • Non‑standard extensions: Some tools support @reboot, @daily, but we focus on portable 5‑field cron.
  • Time zones: Cron typically uses server local time. Our preview uses your browser's timezone to help you reason about absolute UTC offset.
Syntax check – If you see no next execution times, check:
  • Day‑of‑month value ≤ days in month (e.g., 31 in April → never runs).
  • Step values not dividing range evenly (e.g., */7 in hour field works but may be sparse).
  • Both day and weekday are non‑* → intersection condition (rarely intended).

Frequently Asked Questions

Standard Unix crontab uses 5 fields (minute, hour, day, month, weekday). Some schedulers like Quartz add an optional seconds field at the beginning. Our generator uses the universal 5‑field format for maximum compatibility.

Yes, AWS EventBridge Scheduler uses the same 5‑field cron syntax (minute hour day month weekday). Our generated expressions work directly.

If a schedule is very rare (e.g., "0 0 31 2 *" – Feb 31st which never occurs), the engine will show no results. Adjust your constraints to ensure valid dates.

This version supports standard numeric, list, range and step patterns. Special characters (L, W, #) are extensions not covered to maintain broad compatibility and clarity.
References: Linux Crontab Manual, Crontab.guru, AWS EventBridge Cron. Built following industry standards and validated by real-world cron implementations.
Last specification review: April 2, 2026 · Compatible with cron specification v7 (IEEE 1003.1-2017) and modern cloud schedulers.