How to Build Cron Expressions
Cron expressions are the standard way to define recurring schedules in Linux, cloud platforms, CI/CD pipelines, and task schedulers. The syntax is compact but not intuitive — building a visual cron generator shows you exactly when your job will run.
Cron syntax
A cron expression has 5 fields:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sun=0)
│ │ │ │ │
* * * * *
Common cron schedules
| Schedule | Expression | Meaning |
|---|---|---|
| Every minute | * * * * * |
Runs every 60 seconds |
| Every 5 minutes | */5 * * * * |
At :00, :05, :10, :15... |
| Every hour | 0 * * * * |
At the top of every hour |
| Daily at midnight | 0 0 * * * |
Once per day at 00:00 |
| Daily at 9 AM | 0 9 * * * |
Once per day at 09:00 |
| Every Monday at 8 AM | 0 8 * * 1 |
Weekly on Monday |
| First of every month | 0 0 1 * * |
Monthly at midnight on the 1st |
| Weekdays at 6 PM | 0 18 * * 1-5 |
Monday through Friday |
How to build a cron expression
- Set your schedule — use the visual controls to select minute, hour, day, month, and weekday values. Or start with a preset like "every hour" or "daily at midnight."
- Preview run times — the generator shows the next 5 execution times so you can verify the schedule is correct.
- Copy the expression — paste it into your crontab, CI/CD config, or cloud scheduler.
Special characters
| Character | Meaning | Example |
|---|---|---|
* |
Every value | * * * * * = every minute |
*/n |
Every nth | */15 * * * * = every 15 min |
, |
Multiple values | 0 8,12,18 * * * = 8am, noon, 6pm |
- |
Range | 0 9-17 * * * = every hour 9am-5pm |
Tips
- Always check the next run times — cron expressions are easy to get wrong. The preview shows you exactly when the job will fire, so verify before deploying.
- Use presets as starting points — start with a common schedule like "daily" or "hourly" and adjust from there rather than writing from scratch.
- Mind the timezone — cron times are in the system's timezone (usually UTC on servers). If you need 9 AM Eastern, that is
0 14 * * *in UTC during daylight saving time. - Test with short intervals first — when setting up a new cron job, test with
*/5 * * * *(every 5 minutes) to confirm it works, then change to the final schedule.
Frequently Asked Questions
What is the cron expression format?
A standard cron expression has 5 fields separated by spaces, representing minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, where 0 is Sunday). An asterisk (*) means "every" value in that field.
What does */5 mean in cron?
The */5 syntax means "every 5th." In the minute field, */5 means every 5 minutes (0, 5, 10, 15...). In the hour field, */5 means every 5 hours. It works in any field.
Are cron expressions the same on all platforms?
The 5-field format is standard across Linux cron, AWS EventBridge, GitHub Actions, and most scheduling systems. Some platforms add a sixth field for seconds or year. Check your platform's documentation.
How do I schedule something for the last day of every month?
Standard cron does not have a "last day" keyword. Use a workaround like running daily and checking the date in your script, or use platform-specific extensions (AWS EventBridge supports L for "last").