Cron Expression Generator
Build cron expressions visually. Pick presets or customise each field and see a human-readable description instantly.
Pick schedule fields (minute, hour, day, month, weekday) to generate a valid cron expression, or paste an expression to see a human-readable translation.
Check the timezone and overlap risk before putting any generated schedule into production.
Quick Presets
Custom Builder
0-59, *, */n
0-23, *, */n
1-31, *
1-12, *
0-6 (Sun=0)
Expression
* * * * *Description
Every minute
What Is a Cron Expression?
A cron expression is a string of five (or six) fields that defines a schedule. Originally built for Unix's cron daemon in the 1970s, the same syntax now powers scheduled tasks in AWS CloudWatch, GitHub Actions, Kubernetes CronJobs, Vercel, and almost every CI/CD platform.
Think of it as a mini-language for time. Instead of saying "every weekday at 9:30 AM", you write30 9 * * 1-5. Compact, precise, and universally understood by scheduling systems worldwide.
The tricky part is getting the syntax right, a misplaced asterisk can turn a daily job into one that runs every minute. That's where this generator helps: pick your schedule visually and get a validated expression.
Cron Field Reference
| Field | Allowed Values | Special Characters | Example |
|---|---|---|---|
| Minute | 0-59 | * , - / | */15 = every 15 minutes |
| Hour | 0-23 | * , - / | 9-17 = 9 AM to 5 PM |
| Day of Month | 1-31 | * , - / L W | 1,15 = 1st and 15th |
| Month | 1-12 or JAN-DEC | * , - / | 1-6 = January to June |
| Day of Week | 0-6 or SUN-SAT | * , - / L # | 1-5 = Monday to Friday |
What this means for you: The asterisk (*) means "every", the slash (/) means "every Nth", the comma (,) means "and", and the dash (-) means "through". Master those four and you can read any cron expression.
Common Cron Expressions
| Schedule | Expression | Use Case |
|---|---|---|
| Every minute | * * * * * | Health checks, real-time monitors |
| Every 5 minutes | */5 * * * * | API polling, cache refresh |
| Every hour | 0 * * * * | Log rotation, metric aggregation |
| Daily at midnight | 0 0 * * * | Database backups, report generation |
| Daily at 9 AM | 0 9 * * * | Morning digest emails, Slack summaries |
| Weekdays at 9 AM | 0 9 * * 1-5 | Business-hours-only tasks |
| Every Monday at 8 AM | 0 8 * * 1 | Weekly reports, sprint reminders |
| 1st of every month | 0 0 1 * * | Monthly invoicing, billing cycles |
| Every 6 hours | 0 */6 * * * | Data syncs, sitemap regeneration |
| Quarterly (Jan/Apr/Jul/Oct 1st) | 0 0 1 1,4,7,10 * | Quarterly reviews, compliance reports |
Common Cron Mistakes
Forgetting Timezone
Cron expressions don't include timezone information. "0 9 * * *" means 9 AM in whatever timezone the server uses, which might be UTC, not your local time. Always check your platform's timezone setting.
Day-of-Month vs Day-of-Week Conflict
Setting both day-of-month and day-of-week creates an OR condition in standard cron (it runs on either match). Some systems treat it as AND. Know your platform's behaviour.
Running Too Frequently
* * * * * runs every single minute, 1,440 times per day. Great for testing, terrible for production API calls. Always start with a longer interval and decrease.
Overlapping Executions
If your job takes 10 minutes but runs every 5 minutes, you'll have overlapping instances. Use a lock mechanism or ensure your schedule interval exceeds the maximum execution time.
Reading a Cron Expression Left to Right
Cron fields are positional. A value means one thing in the minute field and a different thing in the day-of-month field, so read the five columns in order before deciding what a schedule does.
| Expression | Minute | Hour | Day of Month | Month | Day of Week |
|---|---|---|---|---|---|
| 30 9 * * 1-5 | 30 | 9 | Every day | Every month | Monday to Friday |
| 0 */6 * * * | 0 | Every 6 hours | Every day | Every month | Every weekday |
| 15 2 1 * * | 15 | 2 | 1st | Every month | Every weekday |
The phrase "Every weekday" in the final column above means the day-of-week field is unrestricted. It does not mean Monday to Friday unless the field explicitly says 1-5.
Platform Differences to Check
Seconds field
Unix cron uses five fields. Quartz, some Java schedulers, and some cloud products add a seconds field at the front. A five-field expression can run at the wrong time if pasted into a six-field system.
Day matching
Standard cron can treat day-of-month and day-of-week as an OR. Other platforms may require both. Test any expression that sets both fields.
Names and extensions
JAN, MON, L, W, and # are supported by some schedulers but not all. Numeric expressions are usually the most portable.
Timezone setting
The expression does not carry a timezone. Confirm whether the platform uses UTC, server local time, project settings, or a per-job timezone option.
Safer Production Schedules
| Risk | Example | Safer Pattern |
|---|---|---|
| Thundering herd | Many jobs at 0 * * * * | Use varied minutes such as 7, 23, or 41 |
| Long-running overlap | */5 * * * * for a 7-minute task | Add locking or lengthen the interval |
| DST surprises | 2 AM local time | Use UTC or handle skipped and repeated hours explicitly |
| Month-end assumptions | 0 0 31 * * | Use application logic for "last day of month" |
| Silent failure | No logging or alert | Log each run and alert on missed runs |
Testing Before You Paste into Production
List the next run times
Before shipping, ask your scheduler, CLI, or job platform to preview the next few run times. Check weekdays, month boundaries, and daylight saving changes.
Run once manually
Execute the job manually with production-like inputs before enabling the recurring schedule. Cron should call a tested command, not be the first test of the job.
Set a timeout
A recurring job that hangs can pile up. Set a maximum runtime, record failures, and make repeated failure visible to the team.
Store the schedule with the code
Keep cron strings in versioned config or infrastructure code when possible. A schedule hidden in a dashboard is harder to review and recover.
Related Tools
Unix Timestamp Converter
Convert timestamps for your scheduled job logs.
JSON Formatter
Format cron job configuration files and API responses.
Regex Tester
Test patterns for parsing cron job output and logs.
Chmod Calculator
Set correct permissions for your cron script files.
Hash Generator
Generate checksums for verifying scheduled backup integrity.
SQL Formatter
Format the database queries your cron jobs execute.
How to use this tool
Select a preset schedule or enter custom values in the 5 fields
Read the human-readable description to verify your schedule
Click Copy to grab the cron expression for your config
Common uses
- Scheduling automated database backups at midnight
- Setting up CI/CD pipeline triggers on specific days
- Configuring monitoring alerts at regular intervals
- Automating report generation on the first of each month
Share this tool
Frequently Asked Questions
What is a cron expression?
What does * mean in a cron expression?
What does */5 mean?
What timezone do cron expressions use?
How do I schedule a job for weekdays only?
What's the difference between 5-field and 6-field cron?
Can I run a job on the last day of the month?
What does 0 0 * * * mean?
Can I specify multiple values?
How do I avoid overlapping job executions?
What's the minimum interval for cron?
Is my cron expression saved anywhere?
Results are for general informational purposes only and should be checked before use. They are not professional advice. See our Disclaimer and Terms of Service.