TGetFastCalc
⏱️Developer

Cron Expression Generator & Explainer

Cron Expression Generator & Explainer optimised for JavaScript developers. Free, instant, no signup required.

Runs

At 9:00 AM:00, on MON–FRI

0 9 * * 1-5

Next 5 Run Times

#16/27/2026, 9:00:00 AM959 min from now
#26/28/2026, 9:00:00 AM2399 min from now
#36/29/2026, 9:00:00 AM3839 min from now
#46/30/2026, 9:00:00 AM5279 min from now
#57/1/2026, 9:00:00 AM6719 min from now

Common Patterns

Was this result accurate?

How it works

This cron expression generator & explainer runs entirely in your browser β€” no data is sent to any server. Simply fill in the fields above and the result updates instantly. You can copy the output with the copy button provided.

Frequently Asked Questions

What is a cron expression?

A cron expression is a string with 5 (or 6) space-separated fields that define when a scheduled task should run: minute, hour, day of month, month, and day of week. Example: '0 9 * * 1' means 'at 9:00 AM every Monday'.

What does * mean in cron?

An asterisk (*) means 'every'. '* * * * *' runs every minute. '0 * * * *' runs at minute 0 of every hour (i.e., every hour on the hour).

What is the difference between 5-field and 6-field cron?

Standard Unix/Linux cron uses 5 fields: minute, hour, day, month, weekday. Some systems (like Spring, AWS EventBridge) add a 6th field for seconds at the start, or a year field at the end. This tool uses standard 5-field cron.

Can I run a cron job every 5 minutes?

Yes: '*/5 * * * *' means 'every 5 minutes'. The */n syntax means 'every n units'. Similarly, '0 */2 * * *' runs every 2 hours.

What is the most common cron expression mistake?

Confusing day-of-month and day-of-week interaction. When both fields are set (not *), most systems run the job when EITHER condition is true (OR logic), not both. Use '*' for the field you don't need to avoid ambiguity.

Cron Jobs: The Complete Developer Reference

Cron Syntax Explained: All 5 Fields

The standard cron format has exactly 5 space-separated fields:

[minute] [hour] [day-of-month] [month] [day-of-week]

Field ranges:
- Minute: 0–59
- Hour: 0–23 (24-hour clock)
- Day of month: 1–31
- Month: 1–12 (or JAN–DEC)
- Day of week: 0–7 (0 and 7 both = Sunday, or SUN–SAT)

Special characters:
- * β€” every value
- */n β€” every n-th value (e.g., */5 for every 5 minutes)
- a-b β€” range (e.g., 1-5 for Mon–Fri)
- a,b,c β€” list (e.g., 1,15 for the 1st and 15th)
- L β€” last (e.g., L in day-of-month = last day of month, not all systems support this)

20 Essential Cron Patterns Every Developer Should Know

Here are the most commonly used cron patterns:

  • * * * * * β€” Every minute
  • */5 * * * * β€” Every 5 minutes
  • 0 * * * * β€” Every hour (on the hour)
  • 0 0 * * * β€” Every day at midnight
  • 0 9 * * * β€” Every day at 9:00 AM
  • 0 9 * * 1 β€” Every Monday at 9:00 AM
  • 0 9-17 * * 1-5 β€” Every hour from 9 AM to 5 PM, Mon–Fri
  • 0 0 1 * * β€” First day of every month at midnight
  • 0 0 L * * β€” Last day of every month (Linux cron)
  • 0 0 * * 0 β€” Every Sunday at midnight
  • 30 23 * * * β€” Every day at 11:30 PM
  • 0 */6 * * * β€” Every 6 hours
  • 0 0 1 1 * β€” January 1st at midnight (New Year's reset)
  • */15 9-17 * * 1-5 β€” Every 15 min during business hours
  • 0 2 * * * β€” Every night at 2:00 AM (common for backups)

Cron Across Different Platforms: Key Differences

Cron syntax varies between platforms β€” watch for these differences:

Linux/Unix crontab: Standard 5-field format. Supports @reboot, @daily, @hourly shortcuts.

AWS EventBridge / CloudWatch: Uses 6-field format with year: cron(0 9 ? * MON-FRI *). Also uses ? for 'no specific value' in day fields.

Spring Framework (@Scheduled): 6-field with seconds first: 0 0 9 * * MON-FRI.

GitHub Actions: Uses standard 5-field cron syntax in schedule: triggers. Runs in UTC.

Kubernetes CronJobs: Standard 5-field. Timezone support was added in Kubernetes 1.27 with timeZone field.

Always test cron expressions in a staging environment. An off-by-one in the hour field can cause jobs to run at 3 AM instead of 9 AM.

What a Cron Expression Actually Controls Behind the Scenes

A cron expression is essentially a compact scheduling language that tells a computer exactly when to wake up and do something. Every Unix-like server, cloud platform, and countless automation tools speak this language. The expression itself is just five tokens separated by spaces, but those five tokens can describe schedules ranging from "every single minute" to "only at 3:15 PM on the third Wednesday of March."

This tool works in both directions. You can build an expression visually by selecting your desired schedule, and the tool writes the cryptic string for you. Or you can paste in an existing expression you found in someone else's code, and the tool will translate it into plain English. Either way, you also get the next five scheduled run times calculated instantly, so you can verify the expression actually does what you think it does. That verification step matters more than most people realize until they've been burned by a misconfigured backup job that ran daily instead of weekly.

The Five Fields of Cron Syntax, Decoded with Real Numbers

Every standard cron expression follows the same structure: minute, hour, day-of-month, month, day-of-week. Think of it as answering five questions in order. At what minute? Which hour? What day of the month? Which month? What day of the week? The expression 30 14 1 * * answers these as: minute 30, hour 14 (2 PM), day 1, every month, any weekday. That runs at 2:30 PM on the first of every month.

Special characters expand your options beyond single values. An asterisk means "every possible value." A slash creates intervals, so */15 in the minute field means every 15 minutes: 0, 15, 30, 45. A hyphen defines ranges, so 1-5 in the weekday field means Monday through Friday. A comma lets you list specific values, so 0,30 in the minute field means only at minute 0 and minute 30. Combining these, the expression 0 9-17 * * 1-5 runs every hour on the hour from 9 AM to 5 PM, Monday through Friday. That's nine executions per workday, zero on weekends.

Scheduling a Database Backup: A Complete Walkthrough

Suppose you need to back up a production database every night at 2:30 AM, and every Sunday at 4 AM for a full weekly backup. Start with the nightly job. You want minute 30, hour 2, every day of the month, every month, every day of the week. Enter those values in the visual builder or type 30 2 * * * directly. The tool confirms: "At 2:30 AM every day" and shows the next five run times, like tomorrow at 2:30 AM, then the day after, and so on.

For the weekly full backup, you need minute 0, hour 4, any day of the month, any month, but only Sunday (day 0 in most systems). The expression becomes 0 4 * * 0, and the tool translates it as "At 4:00 AM every Sunday." If your server uses 7 for Sunday instead of 0, the tool's cheat sheet clarifies that both work. Now you have two cron entries ready to paste into your crontab or CI/CD configuration, each verified before they touch production.

Beyond Basic Schedules: Quarterly Reports and Business-Hour Monitoring

Most people use cron for daily or hourly jobs, but it handles less obvious patterns too. Need a quarterly report on the first day of January, April, July, and October at 6 AM? The expression 0 6 1 1,4,7,10 * does exactly that. The month field accepts comma-separated values, so you specify only those four months. The tool shows your next run as January 1st at 6 AM, then April 1st, confirming the three-month gap.

Another overlooked use is business-hour alerting. Say you want uptime checks every 10 minutes, but only during business hours and only on weekdays to avoid weekend noise. The expression */10 9-17 * * 1-5 runs at minutes 0, 10, 20, 30, 40, and 50 during each hour from 9 AM through 5 PM, Monday to Friday. That's 54 checks per workday and exactly zero on Saturday or Sunday. Paste that into the explainer, and you'll see every scheduled time laid out clearly before you commit it to your monitoring system.

The Day-of-Month vs. Day-of-Week Trap and Other Pitfalls

The single most confusing behavior in cron involves setting both day-of-month and day-of-week to specific values. If you write 0 9 15 * 1 hoping it means "9 AM on the 15th, but only if it's a Monday," you'll be disappointed. Most cron implementations treat this as OR logic: it fires on every 15th and every Monday. To run only when both conditions are true, you need wrapper logic outside cron or a scheduling tool that supports AND logic explicitly.

Another common mistake is forgetting that hour uses 24-hour format. Writing 0 9 * * * runs at 9 AM, not 9 PM. For evening schedules, you need 0 21 * * * for 9 PM. Time zones also trip people up because cron typically uses the server's local time, not UTC, unless configured otherwise. Always check your server's time zone setting before deploying a schedule, especially for servers running in cloud regions far from your office. The tool shows run times in your browser's local time, so compare carefully if your server differs.

Related Tools