Cron Expression Generator & Decoder — Build, Test & Read Any Cron Schedule

TK
Toolshubkit Editor
Published Nov 2024
10 MIN READ • Developer Utilities
Have a cron expression you need to decode — or a schedule you need to build from scratch? Our free Cron Expression Builder works both ways: paste any expression like 0 13 * * 1-5 to instantly see its plain-English meaning ("Every weekday at 1:00 PM"), or use the visual dropdowns to generate a validated expression and copy it straight into your crontab, Kubernetes CronJob, GitHub Actions workflow, or AWS EventBridge rule.

Technical Mastery Overview

Visual Schedule Builder
Human-Readable Explanations
Common Presets Library
Local Syntax Validation

What Does Your Cron Expression Mean?

Reading an expression you didn't write? Here are the most commonly searched cron expressions decoded into plain English:

Expression Plain-English Meaning
0 13 * * 1-5 Every weekday (Monday–Friday) at 1:00 PM
0 8 * * 1-5 Every weekday at 8:00 AM
0 0 * * * Every day at midnight (00:00)
*/15 * * * * Every 15 minutes
0 9 * * 1 Every Monday at 9:00 AM
0 0 1 * * First day of every month at midnight
0 0 * * 0 Every Sunday at midnight
0 */6 * * * Every 6 hours (at 00:00, 06:00, 12:00, 18:00)
0 0 1 1 * January 1st at midnight — once per year
@reboot Once on system startup

How to read 0 13 * * 1-5 step by step

Each field maps to a unit of time, left to right:

  • Field 1 — minute: 0 → at minute zero (top of the hour)
  • Field 2 — hour: 13 → at 13:00 (1:00 PM in 24-hour format)
  • Field 3 — day of month: * → every day of the month
  • Field 4 — month: * → every month of the year
  • Field 5 — day of week: 1-5 → Monday (1) through Friday (5), inclusive

Result: runs at 1:00 PM, Monday through Friday. Common use cases: business-hours reports, post-lunch backups, daily digest emails that should only fire on workdays.

Use the same method for any expression — read each field left to right, substitute the value, combine into a sentence.


Understanding the Five (and Six) Fields

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)
│ │ │ │ ┌─ day of week (0–6, 0=Sunday, or SUN–SAT)
│ │ │ │ │
* * * * *

Some systems (Kubernetes CronJobs, AWS EventBridge, many schedulers) add a sixth field for seconds:

┌─────────── second (0–59)
│ ┌───────── minute (0–59)
│ │ ┌─────── hour (0–23)
│ │ │ ┌───── day of month (1–31)
│ │ │ │ ┌─── month (1–12)
│ │ │ │ │ ┌─ day of week (0–6)
│ │ │ │ │ │
* * * * * *

Our generator supports both formats. Always confirm which format your target system uses before deploying — a 6-field expression on a 5-field system will fail silently or throw a parse error.

Special Characters

Character Meaning Example
* Every value in the field * * * * * — every minute
, List of specific values 0 9,17 * * * — at 9am and 5pm
- Range 0 9-17 * * * — every hour from 9am to 5pm
/ Step/interval */15 * * * * — every 15 minutes
L Last (day of month/week) 0 0 L * * — last day of month at midnight
W Nearest weekday 0 0 15W * * — nearest weekday to the 15th
# Nth weekday of month 0 0 * * 1#2 — second Monday of month

Common Schedules Reference

# Every minute
* * * * *

# Every hour (at the top of the hour)
0 * * * *

# Every day at midnight UTC
0 0 * * *

# Every day at 8am
0 8 * * *

# Every weekday (Monday–Friday) at 9am
0 9 * * 1-5

# Every Monday at 9am
0 9 * * 1

# Every Sunday at 2am (good for weekly maintenance)
0 2 * * 0

# Every 15 minutes
*/15 * * * *

# Every 6 hours
0 */6 * * *

# First day of every month at midnight
0 0 1 * *

# Every quarter (Jan, Apr, Jul, Oct) on the 1st at midnight
0 0 1 1,4,7,10 *

# Every weekday at 8am, 1pm, and 6pm
0 8,13,18 * * 1-5

# Last day of every month at 11:59pm
59 23 L * *

The @ Shorthand (Supported by Many Systems)

Some schedulers support named shortcuts:

Shorthand Equivalent Meaning
@yearly / @annually 0 0 1 1 * Once a year, Jan 1 at midnight
@monthly 0 0 1 * * Once a month, first day at midnight
@weekly 0 0 * * 0 Once a week, Sunday at midnight
@daily / @midnight 0 0 * * * Once a day at midnight
@hourly 0 * * * * Once an hour
@reboot Once at system startup

Common Mistakes and Gotchas

Day of month vs Day of week conflict

When you specify both day of month AND day of week (both non-*), most Unix cron implementations use OR logic — the job runs if either condition matches. This surprises developers who expect AND logic.

# Runs on the 15th of the month OR every Friday — not "every Friday the 15th"
0 0 15 * 5

To get "the 15th only if it's a Friday," you need application-level logic, not cron alone.

Month 0 vs Month 12

Standard cron uses 1–12 for months. Some systems use 0–11 (JavaScript-style). Verify with your scheduler.

Day of week 0 vs 7 for Sunday

Most systems accept both 0 and 7 as Sunday. Some don't. Using SUN (the text name) is more portable.

Timezone is the server's timezone

Standard cron runs in the system's local timezone. If your server is UTC and you want a job at "9am business hours," the expression depends on the server's configured timezone — not your local time.

Modern solutions:

  • Kubernetes CronJobs: set spec.timeZone: "America/New_York"
  • AWS EventBridge: supports IANA timezone in schedule expressions
  • GitHub Actions: schedule cron always runs in UTC

Always document the timezone assumption next to every cron expression in your code.

"Every 30 minutes" is not 30 * * * *

# Wrong — runs at :30 past every hour (once per hour, not every 30 min)
30 * * * *

# Correct — runs at :00 and :30 of every hour
*/30 * * * *
# or equivalently:
0,30 * * * *

Jobs overlapping

If your job takes longer than its interval, multiple instances accumulate. A job scheduled every minute that takes 90 seconds will have two instances running simultaneously by the second cycle. Solutions:

  • Add a lock file or mutex (flock, Redis SETNX)
  • Use a job scheduler (Sidekiq, Celery, Temporal) instead of raw cron
  • Set the interval longer than the maximum expected duration

Validating Next Run Times

After building an expression, always verify the next 5–10 scheduled times. Our generator shows a live English translation and next-run preview — "runs every Tuesday and Thursday at 3:00 AM UTC" is immediately verifiable. Compare against the schedule you intended.

Use our Timestamp Converter to translate next-run Unix timestamps to your local time when cross-referencing with other systems or verifying across timezones.

Scheduling Automated Tasks

Cron is commonly used to schedule:

  • Database backups0 2 * * * (2am daily, off-peak)
  • Certificate renewal0 0 * * * (daily check, Let's Encrypt recommends twice daily: 0 0,12 * * *)
  • Report generation0 8 * * 1 (Monday morning, before business hours)
  • Cache warming*/5 * * * * (every 5 minutes)
  • Log rotation0 0 * * * (daily midnight)
  • Docker pruning0 3 * * 0 (Sunday 3am)

For Docker maintenance specifically, combine cron expressions with our Dockerfile Generator to build the containerized jobs that cron will invoke.

AWS Cron Expression Builder: EventBridge Schedule Syntax

AWS EventBridge (formerly CloudWatch Events) uses cron expressions to schedule Lambda functions, ECS tasks, and other AWS resources, but with two differences from standard Unix cron:

  1. Six fields, not five — AWS requires a seconds field OR a year field: cron(minute hour day-of-month month day-of-week year)
  2. You cannot set both day-of-month and day-of-week — one must be ? (meaning "no specific value")
# AWS EventBridge syntax: cron(minute hour day-of-month month day-of-week year)

# Every weekday at 1:00 PM UTC
cron(0 13 ? * MON-FRI *)

# First day of every month at midnight UTC
cron(0 0 1 * ? *)

# Every 15 minutes
rate(15 minutes)

# Every day at 8am UTC
cron(0 8 * * ? *)

Note: AWS EventBridge rate() expressions (rate(5 minutes), rate(1 hour)) are simpler than cron for fixed intervals and are the preferred choice for straightforward recurring schedules. Use cron() only when you need specific days, hours, or day-of-week logic.

Our Cron Expression Builder generates standard 5-field expressions — convert to AWS format by adding ? for the unused day field and wrapping in cron(...).

Testing Before Deploying

The worst time to discover a cron mistake is after deploying to production. Test your expressions with:

  1. The live translation in our generator ("runs every 15 minutes")
  2. A next-run list (does it show the times you expect?)
  3. A manual test run of the underlying script before letting cron invoke it

Use our cURL Generator to test the HTTP endpoints your cron jobs call — validate response codes and payloads before trusting the scheduled invocation. Document the cron job purpose, schedule, and expected behavior in your runbooks using our Markdown Editor.

Experience it now.

Use the professional-grade Cron Generator with zero latency and 100% privacy in your browser.

Launch Cron Generator
Stop guessing what a cron expression means — paste it to decode it, or use the visual builder to generate a new validated schedule. Either way, verify the next-run times before deploying. A misplaced asterisk can mean a job runs 60 times instead of once.