Cron Expression Builder — Visual Schedule Builder with Next-Run Preview

May 25, 2026 · 14 min read · By Michael Lip

Cron expressions are the standard scheduling language for Unix-based systems, CI/CD pipelines, cloud functions, and task queues. But writing them by hand is notoriously error-prone — a misplaced asterisk or a wrong field order can schedule jobs at midnight instead of noon, or fire every second instead of every hour. The Cron Expression Builder gives you a visual, click-to-select interface for every cron field, instant human-readable descriptions, and a live preview of the next 10 run times so you can verify the schedule before deploying it.

Select values for minute, hour, day, month, and weekday by clicking cells in the grid. Use presets for common schedules like every minute, hourly, daily at midnight, or weekly on Monday. Toggle between 5-field (standard Unix) and 6-field (with seconds) cron syntax. The calendar heat map visualizes run frequency across hours and days so you can spot unintended clustering or gaps in your schedule at a glance.

Cron Expression Builder
At minute 0 of every hour
Minute (0–59) Select All / None
Hour (0–23) Select All / None
Day of Month (1–31) Select All / None
Month (1–12) Select All / None
Day of Week (0–6, Sun–Sat) Select All / None

Loading...

Understanding Cron Expression Syntax

Cron is a time-based job scheduling utility that originated in Unix-like operating systems in the 1970s. The cron daemon reads a configuration table called the crontab, where each line defines a schedule and a command to execute. Despite being over fifty years old, cron remains the dominant scheduling mechanism across Linux servers, container orchestration platforms, cloud functions, and modern CI/CD systems. Kubernetes CronJobs, GitHub Actions schedules, AWS EventBridge rules, and Google Cloud Scheduler all accept cron expressions in one form or another.

The standard cron expression consists of five space-separated fields, read from left to right: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 is Sunday). Each field accepts a single value, a list of values separated by commas, a range defined by a hyphen, a step interval defined by a slash, or an asterisk representing all possible values. These primitives combine to express virtually any recurring schedule.

Field-by-Field Breakdown

The minute field (position 1) determines which minute of the hour the job runs. A value of 0 means the top of the hour. A value of */15 means every 15 minutes (0, 15, 30, 45). A value of 5,35 means at minute 5 and minute 35. The minute field is the most granular unit in standard cron — if you need sub-minute precision, you need the 6-field variant with seconds or an alternative scheduler.

The hour field (position 2) uses 24-hour time. A value of 9 means 9 AM. A value of 0 means midnight. A value of 9-17 means every hour from 9 AM to 5 PM inclusive. Combined with the minute field, you can target any specific time: 30 14 * * * means 2:30 PM every day. Most scheduling mistakes happen in this field when developers forget that cron uses 24-hour format and that times are relative to the server timezone.

The day of month field (position 3) accepts values 1–31. A value of 1 means the first of the month. A value of 1,15 means the 1st and 15th. Note that specifying day 31 will simply skip months that have fewer than 31 days. Some implementations support L for the last day of the month, which is more reliable than hardcoding 28, 29, 30, or 31.

The month field (position 4) accepts values 1–12 or three-letter abbreviations (JAN–DEC). A value of 1,4,7,10 schedules the job quarterly. A value of 6-8 restricts execution to the summer months. This field is commonly used for seasonal reports, quarterly billing cycles, and annual maintenance windows.

The day of week field (position 5) accepts values 0–6 (Sunday through Saturday) or three-letter abbreviations (SUN–SAT). A value of 1-5 means weekdays only. A value of 0,6 means weekends only. When both day-of-month and day-of-week are specified (not asterisk), the behavior depends on the implementation — most cron daemons use OR logic (run if either condition matches), while some schedulers use AND logic. This ambiguity is a significant source of bugs.

The 6-Field Cron Format

Several modern scheduling systems prepend a seconds field, creating a six-field format: second, minute, hour, day-of-month, month, day-of-week. Spring Boot's @Scheduled annotation, the Quartz Scheduler library, and AWS EventBridge all support this format. The seconds field uses the same syntax as the minute field (0–59 with wildcard, range, list, and step support).

The critical mistake with 6-field cron is using a 5-field expression where a 6-field is expected, or vice versa. If a system expects 0 0 9 * * MON (at 9:00:00 AM on Monday) and you provide 0 9 * * MON (5-field), the system may either reject it with a cryptic error or, worse, misinterpret the fields. Always verify which format your target platform expects. This builder supports both modes and clearly labels which format is active.

Common Scheduling Patterns

Business hours processing: */10 9-17 * * 1-5 runs every 10 minutes from 9 AM to 5 PM, Monday through Friday. This is ideal for queue processors, notification dispatchers, and data sync jobs that should only run during working hours.

Off-peak batch processing: 0 2 * * * runs at 2 AM daily, a common choice for database backups, report generation, and ETL pipelines. The choice of 2 AM avoids midnight (which is popular and can cause resource contention) and gives enough buffer before business hours to handle failures and retries.

Staggered execution: When running multiple cron jobs, stagger their schedules to avoid thundering herd problems. Instead of scheduling three jobs at 0 * * * * (all at minute 0), use 0 * * * *, 20 * * * *, and 40 * * * * to distribute load evenly across each hour.

End-of-month processing: Scheduling jobs for the last day of the month is tricky because months have different lengths. The expression 0 0 28-31 * * will run on days 28, 29, 30, and 31 when they exist, which means it runs multiple times in months with more than 28 days. Systems that support the L modifier allow 0 0 L * * for a clean last-day-of-month schedule. Without L, the safest approach is to run daily and check the date programmatically.

Calendar Heat Maps for Schedule Visualization

A cron expression describes when a job runs, but it does not make it easy to see the overall pattern. A calendar heat map transforms the abstract expression into a visual grid showing run density across hours and days. Hot cells indicate frequent execution, while cold cells indicate idle periods. The heat map in this tool renders a weekly view with 24 columns (one per hour) and 7 rows (one per day of the week), making it immediately obvious if your schedule has gaps, clusters, or unintended off-hours execution.

Heat maps are especially valuable for complex expressions involving multiple fields. An expression like 0,30 8-20 * * 1-5 is easy to misread, but the heat map instantly shows twice-hourly runs during business hours on weekdays with complete silence on weekends. For teams managing infrastructure automation schedules, the visual verification catches scheduling errors that textual review might miss.

Cron in Cloud Environments

Cloud platforms have adopted cron syntax with platform-specific extensions. AWS EventBridge uses a cron expression with six required fields (minutes, hours, day-of-month, month, day-of-week, year) and requires a question mark (?) in either the day-of-month or day-of-week field. Google Cloud Scheduler uses standard 5-field Unix cron with a configurable timezone. Azure Functions uses the NCrontab format, which adds seconds as a sixth field. GitHub Actions uses standard 5-field cron in the schedule trigger with UTC timezone.

Timezone handling is the most common source of cloud cron bugs. Most schedulers default to UTC, but developers think in local time. A cron expression of 0 9 * * * runs at 9 AM UTC, which is 1 AM Pacific or 5 AM Eastern during daylight saving time. Some cloud schedulers offer an explicit timezone parameter. When available, always set the timezone explicitly rather than manually converting to UTC, which breaks twice a year when daylight saving time shifts.

Debugging and Testing Cron Expressions

The most effective way to verify a cron expression is to generate the next N run times and check them against your expectations. This tool shows the next 10 runs, which is usually enough to confirm the pattern. For monthly or annual schedules, you may need to mentally extrapolate, but the human-readable description helps bridge that gap.

Common debugging scenarios include: a job that runs at midnight instead of noon (forgot 24-hour format), a job that runs every second instead of every minute (used 6-field expression in a 5-field context), a job that runs on both weekdays and weekends (asterisk in the day-of-week field when you intended specific days), and a job that never runs (impossible combinations like day 31 in February). The live preview in this builder catches all of these immediately, which is why teams building production automation systems validate expressions before deployment.

Cron Alternatives and When to Use Them

Cron is excellent for fixed recurring schedules but has limitations. It cannot express intervals that do not divide evenly into an hour or day (like every 7 minutes, which runs 8.57 times per hour). It cannot express relative schedules (like 30 minutes after the previous run completes). It has no built-in retry mechanism, distributed locking, or job dependency management. For these requirements, consider dedicated scheduling libraries like Celery Beat (Python), Bull (Node.js), or Quartz (Java), or managed services like AWS Step Functions or Temporal. However, for the vast majority of periodic tasks — backups, reports, cache warming, health checks — cron remains the simplest and most universal solution.

Frequently Asked Questions

What is a cron expression?

A cron expression is a string of five (or six) space-separated fields that define a time schedule for recurring tasks. The standard five fields represent minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 is Sunday). A sixth field for seconds (0–59) is supported by some systems like Spring and Quartz. The asterisk (*) means every value, and special characters like commas, hyphens, and slashes allow complex patterns.

How do I read a cron expression like '0 */6 * * *'?

Read cron expressions from left to right across the five fields: minute, hour, day-of-month, month, day-of-week. The expression '0 */6 * * *' means: at minute 0, every 6th hour (0, 6, 12, 18), every day of the month, every month, every day of the week. In plain English: “At the top of every 6th hour” or “four times daily at midnight, 6 AM, noon, and 6 PM.”

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

Standard Unix cron uses five fields: minute, hour, day-of-month, month, and day-of-week. Some scheduling systems like Spring Boot's @Scheduled, Quartz Scheduler, and AWS EventBridge add a sixth field for seconds at the beginning. The six-field format is: second, minute, hour, day-of-month, month, day-of-week. Always check which format your target system expects, as using the wrong format causes silent scheduling errors.

What special characters can I use in cron expressions?

Cron expressions support several special characters: asterisk (*) matches all values, comma (,) separates a list of values (e.g., 1,15 for the 1st and 15th), hyphen (-) defines a range (e.g., 1-5 for Monday through Friday), slash (/) specifies step intervals (e.g., */15 for every 15 minutes). Some implementations also support question mark (?) as an alternative to * for day fields, L for the last day of month, W for the nearest weekday, and hash (#) for the Nth weekday of a month.

How do I schedule a cron job to run at a specific time every day?

To run a job at a specific time daily, set the minute and hour fields to your desired time and leave the remaining fields as asterisks. For example, 30 9 * * * runs at 9:30 AM every day. For 2:15 PM, use 15 14 * * *. Remember that cron uses 24-hour time and the timezone configured on the server. To run at midnight, use 0 0 * * *. To run multiple times, list the hours: 0 9,17 * * * runs at 9 AM and 5 PM.

Related Tools