Cron Expression Generator
Build cron expressions visually, preview next run times, and generate code snippets. All client-side.
At 9:00 AM, on Monday through Friday
0 0 * * 1-5AI-powered natural language to cron conversion is coming soon. Use the visual builder above for now.
import cron from 'node-cron';
cron.schedule('0 9 * * 1-5', () => {
console.log('Task executed at', new Date().toISOString());
// Your task here
}, {
timezone: 'Asia/Seoul'
});What is a Cron Expression?
A cron expression is a string of fields separated by spaces that represents a schedule. Originally used in Unix-like operating systems for the cron daemon, cron expressions are now ubiquitous in task scheduling across platforms — from CI/CD pipelines (GitHub Actions) to container orchestration (Kubernetes CronJobs) and cloud services (AWS CloudWatch Events).
The standard cron expression uses 5 fields: minute, hour, day of month, month, and day of week. Extended formats like Quartz (Java) add seconds and year fields, while AWS CloudWatch uses 6 fields with a year field.
Cron Field Reference
| Field | Allowed Values | Special Characters | Example |
|---|---|---|---|
| Minute | 0-59 | * , - / | */15 (every 15 min) |
| Hour | 0-23 | * , - / | 9-17 (business hours) |
| Day of Month | 1-31 | * , - / | 1,15 (1st and 15th) |
| Month | 1-12 | * , - / | 1,4,7,10 (quarterly) |
| Day of Week | 0-6 (Sun=0) | * , - / | 1-5 (Mon-Fri) |
| Year (optional) | 1970-2099 | * , - / | 2024-2026 |
| Seconds (Quartz) | 0-59 | * , - / | */30 (every 30 sec) |
Common Cron Expression Examples
| Expression | Description |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour (at minute 0) |
0 0 * * * | Every day at midnight |
0 9 * * 1-5 | Weekdays at 9:00 AM |
0 0 1 * * | First day of every month at midnight |
0 0 * * 0 | Every Sunday at midnight |
30 4 1,15 * * | 1st and 15th at 4:30 AM |
0 22 * * 1-5 | Weekdays at 10:00 PM |
0 0 1 1 * | January 1st at midnight (yearly) |
Special Characters in Cron
*AsteriskMatches every possible value for the field. e.g., * in the hour field means every hour.
,CommaSpecifies a list of values. e.g., 1,3,5 in the day-of-week field means Monday, Wednesday, Friday.
-HyphenSpecifies a range of values. e.g., 9-17 in the hour field means from 9 AM to 5 PM.
/SlashSpecifies step values. e.g., */15 in the minute field means every 15 minutes.
Frequently Asked Questions
What is the difference between standard cron, Quartz, and AWS CloudWatch cron?
Standard cron uses 5 fields (minute, hour, day-of-month, month, day-of-week). Quartz cron (used in Java applications) adds seconds as the first field and an optional year as the 7th field. AWS CloudWatch uses 6 fields, adding a year field at the end. The special characters may also differ slightly between implementations.
Are cron expressions timezone-aware?
By default, cron expressions are evaluated in the system's local timezone. However, many modern tools allow specifying a timezone. This generator lets you input times in KST (Korea Standard Time, UTC+9) and automatically shows the UTC equivalent for services like GitHub Actions that require UTC.
What happens when day-of-month and day-of-week are both specified?
In standard cron, if both fields are specified (not *), the job runs when EITHER condition is met (OR logic). For example, '0 0 15 * 5' runs at midnight on the 15th of every month AND every Friday. Some implementations like Quartz use AND logic instead.
Can I run a cron job every 30 seconds?
Standard 5-field cron expressions have minute-level granularity. For sub-minute scheduling, you need either the Quartz format (which supports seconds) or a workaround like running two cron jobs offset by 30 seconds. Kubernetes CronJobs also only support minute-level scheduling.
How do I test if my cron expression is correct?
Use this generator's 'Next 10 Runs' preview to verify your schedule visually. Enter your expression in the Parse field or build it with the visual builder, then check the upcoming run times match your expectations.
What is the minimum interval for GitHub Actions cron?
GitHub Actions scheduled workflows have a minimum interval of 5 minutes. Expressions that would run more frequently are throttled. Also, GitHub Actions cron uses UTC time — use our UTC conversion feature to set the correct schedule.
Is my data sent to any server?
No. All cron expression building, parsing, and next-run calculations happen entirely in your browser. No data is sent to any server. This tool is completely client-side.
Related Tools
Format, validate, and beautify JSON with tree view and TypeScript type generation.
Test regular expressions with real-time matching, capture groups, and code snippets.
Generate UUID v4, v7, ULID, and Nano ID with bulk generation and format options.
Encode and decode text, images, and files to Base64 with real-time conversion.