Cron Generator

Build cron expressions with live validation, human-readable descriptions, and next run previews.

Cron Builder
Configure your schedule — updates in real time

0-59, * for every, */n for every n, comma-separated lists (e.g. 0,30), ranges (e.g. 0-15)

0-23, * for every, */n for every n hours

1-31, * for every day, L for last day of month

1-12 or JAN-DEC, * for every month

0-6 or SUN-SAT (0=Sunday), * for every day, 1-5 for weekdays

Cron Expression
Your generated schedule
Valid
0 9 * * 1-5
Cron Syntax Reference for Linux, Kubernetes & CI/CD

Cron expressions define recurring schedules for background tasks across almost every DevOps platform: Linux crontab daemons, Kubernetes CronJob resources, GitHub Actions schedule: triggers, Jenkins periodic builds, and cloud serverless event rules.

Because off-by-one field mistakes can cause a database backup or certificate renewal job to run every minute instead of once a night, verifying the human-readable translation and inspecting the next five calculated run timestamps before deploying is essential.

Special Operators Explained

  • Asterisk (*): Matches every possible value for that field (e.g., * in the hour field means every hour).
  • Step values (*/n): Runs at every nth interval (e.g., */15 in the minute field triggers at :00, :15, :30, and :45).
  • Ranges (a-b): Matches an inclusive range (e.g., 1-5 in Day of Week matches Monday through Friday).
  • Lists (a,b,c): Matches specific discrete values (e.g., 0,12 in the hour field runs at midnight and noon).

Production Cron Examples

# Kubernetes CronJob (with concurrency policy)
apiVersion: batch/v1
kind: CronJob
metadata:
  name: nightly-db-backup
spec:
  schedule: "0 2 * * *"
  timeZone: "UTC"
  concurrencyPolicy: Forbid

# GitHub Actions scheduled workflow (.github/workflows/nightly.yml)
on:
  schedule:
    - cron: '30 3 * * 1-5'
Frequently Asked Questions

What are the 5 fields in a standard cron expression?

From left to right, the 5 fields represent: Minute (0–59), Hour (0–23), Day of Month (1–31), Month (1–12 or JAN–DEC), and Day of Week (0–6 where 0 is Sunday, or SUN–SAT). All five fields are separated by spaces.

What timezone do Kubernetes CronJobs and GitHub Actions use?

GitHub Actions scheduled workflows always evaluate cron expressions in UTC. Kubernetes CronJobs default to the kube-controller-manager timezone (usually UTC) unless you explicitly set spec.timeZone (for example, Europe/London or America/New_York) in Kubernetes 1.27+.

What happens if I specify both Day of Month and Day of Week?

In standard Vixie cron, if neither Day of Month nor Day of Week is *, the job runs when EITHER condition matches (logical OR, not AND). For example, 0 9 15 * 1 runs at 09:00 on the 15th of the month AND on every Monday.

How does Jenkins cron syntax differ from standard Linux cron?

Jenkins uses an H (hash) symbol—such as H/15 * * * * or H 2 * * *—to jitter scheduled builds across a time window based on the job name hash, preventing dozens of pipelines from thundering-herding build agents at the exact top of the hour.

Related Engineering Guides

Automate scheduled tasks across Linux servers, Kubernetes, and CI pipelines: