Free Cron Expression Generator - Build Cron Jobs Visually
325 usesCron Expression
* * * * *
Tips
5 Fields
Standard cron uses 5 fields: minute, hour, day-of-month, month, and day-of-week
Wildcard
The asterisk (*) means every possible value for that field
Common Patterns
Use presets for quick setup: daily at midnight (0 0 * * *), hourly (0 * * * *)
Validation
Always verify your cron expression by checking the next 5 execution times
Frequently Asked Questions
Can I make a cron job run every 2 hours, but only on weekdays?
Absolutely. Set the minute field to 0, then use */2 in the hour field for every 2 hours. Add 1-5 in the day-of-week field. That gives you "0 */2 * * 1-5". Our tool's live preview will show it firing at 00:00, 02:00, 04:00 and so on, Monday through Friday only. Double-check the preview around midnight to avoid surprises.
Does */5 in the minute field mean the job runs every 5 seconds?
No — */5 in the minute field means every 5 minutes, not seconds. Cron doesn't have a seconds field at all. Our generator shows this clearly: selecting */5 for minutes gives you runs at :00, :05, :10, and so on. One common mistake is thinking you can get sub-minute intervals. You can't with standard cron. For 5-second intervals, you'd need a different solution like a loop inside your script or a dedicated scheduler.
Why does my cron job run twice when I use both day-of-month and day-of-week?
This trips up nearly everyone at some point. Standard cron treats those two fields as OR, not AND. So `15 15 * * 1` fires on the 15th of every month AND every Monday. Our generator catches this: when you select both fields, a yellow warning appears. Click the toggle to force AND logic, or use our 'advanced mode' to add a script-side check. Pro tip: always verify next five runs in the live preview before deploying.
Can I use this generator to schedule a job that runs on the last day of every month?
Yes — that's one of the trickier schedules cron supports, but our generator handles it. For the last day of the month, use 'L' in the day-of-month field. Most UIs don't expose this, but ours has a dedicated toggle under advanced options. This produces an expression like `0 0 L * *`. The live preview is essential here: it'll show exact dates like Jan 31, Feb 28 (or 29 in leap years). Works reliably for billing cycles and monthly reports.
Why does my cron job run at the wrong time after daylight saving time changes?
Cron handles DST differently depending on your server's timezone settings. If you're using UTC, nothing shifts — but local time zones can cause jobs to fire twice or skip entirely. Our generator shows a timezone dropdown in the preview panel; set it to match your server. For example, a 2:30 AM job won't run on the spring-forward day in most US zones. Best practice: schedule at times that exist every day, like 3:15 AM, or stick to UTC if your workflow tolerates it.
Is there a way to test my cron expression against a specific date range before deploying it?
The live preview already covers this. Set your expression, then look at the preview panel's date range filter. You can narrow it to, say, next Tuesday through Thursday and see exactly which iterations fire within that window. If you're debugging a one-off issue like a holiday schedule, that range view beats scrolling through 20 upcoming runs. Give it ten seconds of clicking around; you'll find the calendar icon in the preview header.
Can I generate a cron expression that runs only on the second Wednesday of each month?
Standard cron doesn't support 'second Wednesday' directly, but our generator handles it with a workaround. Use '0 0 ? * 3#2' if your system supports Quartz syntax — we have a toggle for that. Otherwise, pick day-of-week 3 and add a script-side check comparing the date to the second Wednesday. The live preview will show you exactly which dates match, like Feb 12 or Mar 12. Test it against a full year to catch edge cases like months with five Wednesdays.
Does the generator store my cron expressions or send them to a server?
Everything runs in your browser. The dropdowns, presets, and next-run calculations all use client-side JavaScript, so nothing gets posted to a backend. You can confirm this yourself: open DevTools, hit the Network tab, and watch for requests when you build an expression like 0 3 * * 1-5. You'll see none. If you're on a shared machine, still clear your browser cache afterward — some browsers log form state locally.
What happens if my server restarts while a cron job is supposed to be running?
If your server goes down during the scheduled execution time, cron simply skips that instance. It won't catch up when the machine boots back up. Our preview tool won't warn you about server downtime, so you need to pair your expression with system utilities like anacron. For critical database backups, use a monitoring alert to catch missed runs before they cause data issues.
How many upcoming execution times does the preview show by default?
Our live preview displays your next 5 scheduled executions right away as you adjust the dropdowns. If you need to check a longer timeframe for maintenance windows, just click the expand button to reveal 20 upcoming runs. This helps you spot overlapping jobs before pushing changes to production.
How to Use
- Select values from the dropdowns for each field or click a preset
- The cron expression updates in real-time below
- Check the human-readable description to verify
- Review the next 5 execution times
- Click Copy to use the expression in your crontab