0 9 * * 1-5

At 9:00 AM, on weekdays (Mon–Fri)

Use the Builder tab to generate • Paste in Explainer to decode any expression

valid

0–59

valid

0–23

valid

1–31

valid

1–12 or JAN–DEC

valid

0–6 (Sun=0)

Special Characters Reference

*
Wildcard* → any value in this field
,
List1,3,5 → Monday, Wednesday, Friday
-
Range1-5 → Monday through Friday
/
Step*/5 → every 5 units; 1-30/2 → every 2, starting 1
?
No specific value? → DOM or DOW wildcard (Quartz/AWS only)
L
LastL in DOM → last day of month (Quartz only)
W
Nearest Weekday15W → nearest weekday to the 15th (Quartz only)
#
Nth Weekday2#3 → 3rd Monday of the month (Quartz only)

Sponsored

Sponsored banner

Everything You Need to Work with Cron Expressions

From beginner-friendly presets to production-ready platform conversions — the only cron tool you need, whether you are scheduling your first job or debugging a complex AWS EventBridge expression.

Visual Builder + Explainer

Build expressions field-by-field with quick-pick chips, or paste any existing cron string to instantly get a plain-English explanation — both in the same tool.

Next 10 Run Times

See exactly when your job will next execute — with both full timestamps and relative labels like 'in 3 hours' or 'tomorrow' — before deploying to production.

30+ Curated Presets

One-click templates organised into 7 categories: Frequent, Hourly, Daily, Weekly, Monthly, Business hours, and System maintenance. Loads into both Builder and Explainer.

7 Platform Formats

Converts to AWS EventBridge (cron wrapper, 1-based DOW, ? rule), Spring/Quartz (6-field, second prepended), Kubernetes YAML, GitHub Actions YAML, Node.js, and GCP.

Field-by-Field Breakdown

The Explainer tab shows every field with a detailed English description — including step ranges, lists, month names, day names, and boundary validation.

Special Characters Guide

Inline reference for *, /, -, ,, ?, L, W, and # — with examples for each character so you never need to look up the manual again.

Related Tools

{}

JSON Formatter

Format, validate, and auto-repair JSON with live preview, syntax error detection, sort keys A-Z, and one-click copy or download

{}↓

JSON Minifier

Compress JSON by removing all whitespace. Shows original size, minified size, bytes saved, and percentage reduction.

JSON to CSV Converter

Convert JSON arrays to CSV and CSV back to JSON. Nested object flattening, multi-delimiter support, type detection.

JSON to YAML Converter

Convert JSON to YAML for Kubernetes, Docker Compose, and config files. Also converts YAML back to JSON.

JSON Diff Tool

Compare two JSON objects side-by-side. Color-coded diff showing added, removed, changed, and unchanged keys with dot-notation paths.

🌲

JSON Tree Viewer

Visualize JSON as an interactive collapsible tree with color-coded types, live search, and node statistics.

JSON to XML Converter

Convert JSON to well-formed XML with configurable root element. Also converts XML back to JSON using browser DOMParser.

JSON to SQL Converter

Convert JSON arrays to MySQL, PostgreSQL, or SQLite INSERT statements with auto type detection, CREATE TABLE, and batch insert support.

✓→

TODO Formatter

Format and organize TODO comments for better readability.

QR Code Generator

Generate QR codes for URL, WiFi, vCard, UPI payment, WhatsApp, email, SMS, and 5 more types with color customization and logo overlay

🔑

JWT Decoder

Decode, verify, and build JSON Web Tokens. Inspect all claims with explanations, verify HS256/RS256/ES256 signatures via Web Crypto API, and generate signed JWTs — no server required.

🔗

Slug Generator

Generate SEO-friendly URL slugs in 8 formats — kebab, snake, camelCase, PascalCase, and more

Anatomy of a Cron Expression

A standard Unix cron expression has exactly 5 fields, separated by spaces. Each field restricts which values of that time unit will trigger the job. An asterisk (*) in any field means "match all values." The cron daemon checks every minute whether the current time matches all five fields; if it does, the command runs.

Minute
Hour
Day/Month
Month
Day/Week
0
9
*
*
1-5
0–59
0–23
1–31
1–12
0–6 (Sun=0)

The expression above: "At 9:00 AM, Monday through Friday" — a typical business-hours job schedule.

ExpressionMeaningUse Case
* * * * *Every minuteReal-time tasks, health checks
*/5 * * * *Every 5 minutesPolling, data sync
0 * * * *Every hourHourly aggregation
0 0 * * *Midnight every dayDaily backups, reports
0 9 * * 1-59 AM weekdaysBusiness-hours jobs
0 0 1 * *1st of every month at midnightMonthly billing, archiving
0 0 * * 0Midnight every SundayWeekly maintenance window
0 2 * * 02 AM every SundayWeekly database backup
0 9,13,18 * * *9 AM, 1 PM, 6 PM every dayThree-times-daily digest
0 0 1 1 *Midnight on January 1stAnnual reset or archive

Special Characters — Complete Reference

Cron expressions support several special characters that give you precise control over scheduling. Some are universal (*, /, -, ,) and others are platform-specific (?, L, W, #).

CharNameHow it worksExample
*WildcardMatches every value in the field* in hour → every hour
,ListMatches multiple specific valuesMON,WED,FRI → 3 days
-RangeMatches a continuous range of values9-17 → 9 AM to 5 PM
/StepMatches every Nth value. */N starts from min; N/step from N*/15 → 0,15,30,45
?No specificPlaceholder in DOM/DOW when the other is set (Quartz/AWS)0 9 ? * MON-FRI
LLastLast day of month (DOM) or last weekday (DOW). Quartz onlyL in DOM → 28-31
WNearest WeekdayNearest weekday to a given date. Quartz only15W → Mon if 15th is Sun
#Nth weekdayThe Nth occurrence of a day in the month. Quartz only2#3 → 3rd Monday

Platform Differences — Unix vs AWS vs Quartz

The original Unix cron format is the reference, but every major platform has made modifications. Knowing the differences saves hours of debugging silent failures.

FeatureUnix/LinuxAWS EventBridgeSpring/Quartz
Number of fields56 (+ year)6 (+ optional year)
Seconds fieldNoNoYes — first field, always 0
DOW base0 = Sun, 6 = Sat1 = Sun, 7 = Sat1 = Sun, 7 = Sat
? characterNot supportedRequired in DOM or DOWRequired in DOM or DOW
L / W / #Not supportedNot supportedSupported
Wrapper syntaxNonecron(…)None
TimezoneSystem timezoneUTCJVM timezone
Min interval1 minute1 minute1 second
DefaultStandard crontabCloudWatch Events schedulerSpring @Scheduled, Quartz Job

Common Cron Mistakes and How to Avoid Them

Cron bugs are notoriously silent — a misconfigured expression just never runs, with no error message. These are the mistakes that catch both beginners and experienced engineers.

Using 1 for Sunday instead of 0

In standard Unix cron, Sunday is 0 (and also 7 in most implementations). Using 1 for Sunday will actually run on Monday. Always verify: 0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat. Quartz and AWS flip this to 1=Sun, 7=Sat — so the same number means a different day depending on the platform.

Forgetting that cron uses 24-hour time

There is no AM/PM in cron. Hour 9 = 9:00 AM, hour 12 = noon, hour 13 = 1:00 PM, hour 17 = 5:00 PM, hour 0 = midnight. A common mistake is writing '9 * * * *' expecting it to run at 9 AM every minute — but it actually runs every minute during the 9 AM hour. For 9 AM once per day: '0 9 * * *'.

DOM and DOW OR logic surprise

When both the day-of-month and day-of-week fields are specified (non-wildcard), cron uses OR logic — the job runs when EITHER condition matches. So '0 9 1 * 1' runs on the 1st of every month AND every Monday, not just the first Monday. To run only on the first Monday, you need a script that checks the date at runtime, or use Quartz's '2#1' syntax.

Assuming cron runs in your local timezone

Cloud platforms like AWS EventBridge and GitHub Actions run cron in UTC. '0 9 * * 1-5' on AWS means 9:00 AM UTC — that is 2:30 PM in IST (UTC+5:30) or 4:00 AM in PST (UTC-5). Always check the platform's timezone and adjust accordingly. On Linux, set the TZ environment variable in the crontab or check /etc/timezone.

Not handling missed runs

If your server is down during a scheduled run, standard cron silently skips it — there is no catch-up mechanism. This can cause data to be missed or jobs to run out of sequence. For critical jobs, implement idempotent logic in your script, use a job queue with retry capability (BullMQ, Celery), or add monitoring with tools like Cronitor or Healthchecks.io that alert you when a job is late.

Not testing with the next-run preview

Writing '0 9 * * 5' and expecting it to run on Fridays at 9 AM is correct — but the next run might be 6 days away, making it hard to test in development. Always use a cron expression validator that shows upcoming run times before deploying. Set a short-interval test expression first (e.g., '*/5 * * * *'), verify the job works, then switch to the production schedule.

Frequently Asked Questions — Cron Expressions

What is a cron expression and how does it work?

A cron expression is a string of 5 space-separated fields that define a recurring schedule for automated tasks. Each field represents a time unit: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 is Sunday). The cron daemon (or scheduler) reads this expression and executes the associated command every time the current date/time matches the pattern. For example, '0 9 * * 1-5' means 'at 9:00 AM, Monday through Friday'.

What does each field in a 5-field cron expression represent?

The five fields in order are: (1) Minute — 0 to 59, (2) Hour — 0 to 23 using 24-hour time, (3) Day of Month — 1 to 31, (4) Month — 1 to 12 (or JAN to DEC), (5) Day of Week — 0 to 6 where 0 and 7 both represent Sunday (or SUN to SAT). Use * to mean 'any value' in a field. Example: '30 6 * * 1' means 'at 6:30 AM every Monday'. A common mnemonic is: Minute Hour Day Month Weekday.

How do I run a job every 5 minutes with cron?

Use the step operator /. The expression '*/5 * * * *' means 'every 5 minutes'. The */ syntax means 'starting from 0, every N units'. So */5 for minutes gives: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55. You can also use '*/10' for every 10 minutes, '*/15' for every 15 minutes, or '*/30' for every 30 minutes. To run every 5 minutes only during business hours on weekdays: '*/5 9-17 * * 1-5'.

What is the difference between * and ? in cron expressions?

The * (asterisk) is the standard wildcard meaning 'any value' and is supported by all cron implementations. The ? (question mark) means 'no specific value' and is used in Quartz Scheduler (Spring), AWS EventBridge, and some other platforms. In these platforms, when you specify a day-of-week value, you must use ? for the day-of-month field (and vice versa) to avoid ambiguity. Standard Unix/Linux crontab does not support ? — use * instead.

How do I schedule a job on the last day of the month?

In standard Unix cron, there is no direct way to schedule on the last day of every month because months have different lengths. A common workaround is to use a script that checks if tomorrow is the 1st: '0 23 28-31 * * [ "$(date -d tomorrow +\%d)" = "01" ] && /your/script'. In Quartz Scheduler (Spring/Java) and some extended cron implementations, you can use 'L' in the day-of-month field: '0 0 23 L * ?' means 'at 11:00 PM on the last day of every month'.

Why does cron use 0 for Sunday instead of 1?

Unix cron traditionally numbers days of the week starting from Sunday as 0, ending with Saturday as 6. This follows the POSIX standard and C's struct tm.tm_wday convention. In practice, both 0 and 7 work for Sunday in most cron implementations. However, Quartz Scheduler (used in Spring/Java) uses a different numbering: SUN=1, MON=2, ..., SAT=7. AWS EventBridge also uses 1-based DOW. Always verify the numbering for your specific platform to avoid off-by-one bugs.

What is the difference between cron and crontab?

Cron is the background daemon (service) that reads schedules and executes commands at the right time. It runs continuously in the background on Unix-like systems. Crontab (cron table) is the configuration file that lists the schedules — each line is one job. Every user on a system can have their own crontab file, edited with 'crontab -e'. The system also has a global crontab at /etc/cron.d/. The term 'cron expression' refers to the time-specification part of a crontab line.

How do I run a cron job on weekdays only?

Use the day-of-week field with a range. '1-5' means Monday through Friday (1=Mon, 5=Fri). For example, '0 9 * * 1-5' runs at 9:00 AM Monday through Friday. You can also use names: '0 9 * * MON-FRI'. Note: if you also specify a day-of-month value (not *), cron uses OR logic — the job runs when either the DOM or DOW matches. To avoid this, keep the DOM field as * when restricting by day of week.

What timezone does cron use?

Standard Unix/Linux cron runs in the system's local timezone, which is set by the TZ environment variable or the system's /etc/localtime. Many cloud platforms like AWS EventBridge and GitHub Actions run cron in UTC by default — always check the platform docs. To avoid timezone confusion in production systems, it is best practice to write cron expressions in UTC and document this clearly. Tools like GCP Cloud Scheduler let you specify a timezone per job, which is more intuitive for business-hour schedules.

How is the AWS EventBridge cron format different from standard cron?

AWS EventBridge cron has several key differences: (1) It is wrapped in cron(): 'cron(0 9 ? * MON-FRI *)'. (2) A 6th field for year is added at the end (usually *). (3) Day of week is 1-based: SUN=1, MON=2, ..., SAT=7 (unlike Unix 0-based). (4) Either DOM or DOW must be ? — you cannot restrict both simultaneously. (5) You cannot use */1 for every minute; the minimum interval is 1 minute using '* * * * ? *'. EventBridge also supports rate expressions like 'rate(5 minutes)' as an alternative to cron.

How does Spring Quartz Scheduler's cron format differ from Unix cron?

Quartz cron expressions have 6 required fields (and an optional 7th for year): SECOND MINUTE HOUR DAY-OF-MONTH MONTH DAY-OF-WEEK [YEAR]. Key differences from Unix: (1) A seconds field is added as the first field (usually 0). (2) DOW uses 1-based numbering: SUN=1, MON=2, ..., SAT=7. (3) Either DOM or DOW must be ?, not both specified. (4) Supports additional special characters: L (last), W (nearest weekday), # (nth weekday). Example: '0 0 9 ? * MON-FRI' is equivalent to Unix '0 9 * * 1-5'.

How do I test a cron expression before deploying it?

The best way is to use an online cron expression checker like this tool, which shows the next 10 exact run times — so you can verify the schedule matches your intent before deploying. For production systems, also consider: (1) Run the job manually once to verify the command works. (2) Test with a short interval (e.g., every minute) and monitor for a few runs, then change to the production schedule. (3) Check timezone settings explicitly — many production bugs come from UTC vs local time mismatch. (4) Use cron job monitoring tools (Dead Man's Snitch, Cronitor, Healthchecks.io) to detect missed or failed runs.