Ctrl + K
Date & Time12 min read

Common Cron Expression Examples

Learn common cron expressions for scheduling recurring tasks, from simple hourly and daily jobs to weekday, monthly, and interval-based schedules.

Published: 2026-09-02

Cron expressions provide a compact way to schedule recurring commands and automated jobs. Once the five-field structure is familiar, many common schedules can be expressed with a short combination of numbers, asterisks, ranges, lists, and step values.

This guide collects practical cron expression examples that are useful for system administration, application maintenance, backups, reports, cleanup jobs, monitoring, and other recurring tasks. Each example explains what the expression means so you can adapt it to your own schedule.

Cron Expression Format

The traditional Unix cron format contains five fields separated by spaces. They represent the minute, hour, day of the month, month, and day of the week.

minute hour day-of-month month day-of-week
FieldTypical RangeExample
Minute0–5930
Hour0–2314
Day of month1–3115
Month1–126
Day of week0–71

The examples below use the traditional five-field format. Some schedulers support additional fields or special syntax, so always check the documentation for the cron implementation you are using.

1. Every Minute

* * * * *

This is one of the simplest cron expressions. It matches every minute of every hour, every day, every month.

⚠️ Running a job every minute can create significant load if the command is expensive or takes a long time to finish. Use frequent schedules only when the task genuinely requires them.

2. Every Five Minutes

*/5 * * * *

The step expression */5 in the minute field selects minutes 0, 5, 10, 15, and so on through 55. The command therefore runs every five minutes.

3. Every Ten Minutes

*/10 * * * *

This expression runs at ten-minute intervals aligned to the hour: 00, 10, 20, 30, 40, and 50 minutes past each hour.

4. Every Fifteen Minutes

*/15 * * * *

This runs at minutes 0, 15, 30, and 45 of every hour. It is commonly used for periodic synchronization, polling, or lightweight maintenance jobs.

5. Every Thirty Minutes

*/30 * * * *

This runs twice per hour, at the beginning and halfway through each hour.

6. At the Start of Every Hour

0 * * * *

The minute field is fixed at 0 while the hour field accepts every value. The job therefore runs at 01:00, 02:00, 03:00, and so on.

7. Every Two Hours

0 */2 * * *

The step value in the hour field selects every second hour. The task runs at the beginning of every other hour.

8. Every Six Hours

0 */6 * * *

This commonly results in executions at 00:00, 06:00, 12:00, and 18:00 each day.

9. Every Day at Midnight

0 0 * * *

This expression runs once per day at 00:00, assuming the scheduler uses the expected local time zone.

10. Every Day at 6 AM

0 6 * * *

The task runs at 06:00 every day. This type of schedule is useful for daily reports, data synchronization, or maintenance operations.

11. Every Day at 9:30 AM

30 9 * * *

The minute is set to 30 and the hour to 9, so the command runs every day at 09:30.

12. Multiple Times Per Day

0 9,13,17 * * *

The comma-separated hour list selects 09:00, 13:00, and 17:00 every day.

13. During Business Hours

0 9-17 * * *

This runs at the beginning of every hour from 09:00 through 17:00. The range applies to the hour field.

14. Every Fifteen Minutes During Business Hours

*/15 9-17 * * *

This combines a minute step with an hour range. The job runs every 15 minutes during the hours from 09:00 through 17:00.

15. Every Weekday at 9 AM

0 9 * * 1-5

In the traditional day-of-week field, 1 through 5 commonly represent Monday through Friday. This expression therefore runs at 09:00 on weekdays.

16. Every Monday at 9 AM

0 9 * * 1

This schedules the command for 09:00 every Monday.

17. Every Friday at 5 PM

0 17 * * 5

This runs at 17:00 every Friday. It can be useful for generating weekly reports or triggering end-of-week processing.

18. Every Sunday at Midnight

0 0 * * 0

The expression runs at 00:00 on Sunday in implementations where 0 represents Sunday.

19. Every Monday Through Friday at 8:30 AM

30 8 * * 1-5

This is a common schedule for a task that should run once at the start of each weekday.

20. First Day of Every Month

0 0 1 * *

The day-of-month field is fixed at 1, so the task runs at midnight on the first day of each month.

21. Fifteenth Day of Every Month

0 0 15 * *

This runs at midnight on the 15th day of every month.

22. First Day of Every Month at 8 AM

0 8 1 * *

This schedules a monthly task for 08:00 on the first calendar day of each month.

23. Every Three Months

0 0 1 */3 *

The step value in the month field selects every third month within the implementation's month range. Combined with day 1 and midnight, this creates a quarterly-style schedule.

24. Once a Year

0 0 1 1 *

This runs at midnight on January 1 each year.

25. A Specific Date Each Year

30 10 15 6 *

This expression runs at 10:30 on June 15 each year.

26. Multiple Days of the Week

0 12 * * 1,3,5

The list in the day-of-week field selects Monday, Wednesday, and Friday. The task runs at noon on those days.

27. Multiple Days of the Month

0 8 1,15 * *

This runs at 08:00 on the first and fifteenth day of every month.

28. Nightly Database Maintenance

30 2 * * *

A schedule such as 02:30 every day is often suitable for maintenance tasks that should run outside the application's busiest hours.

29. Weekly Database Backup

0 3 * * 0

This runs at 03:00 every Sunday in the traditional five-field format. A weekly backup schedule can be useful when combined with an appropriate backup retention strategy.

30. Log Cleanup on Weekends

0 4 * * 6,0

This schedules a task for 04:00 on Saturday and Sunday when the implementation uses 6 for Saturday and 0 for Sunday.

Common Cron Examples at a Glance

Cron ExpressionMeaning
* * * * *Every minute
*/5 * * * *Every 5 minutes
*/15 * * * *Every 15 minutes
0 * * * *Every hour
0 */2 * * *Every 2 hours
0 0 * * *Every day at midnight
0 9 * * 1-5Weekdays at 09:00
0 9 * * 1Mondays at 09:00
0 0 1 * *First day of every month
0 0 1 1 *January 1 every year

How to Choose the Right Cron Expression

Start by describing the schedule in plain language. Decide how frequently the task should run, then determine whether the schedule depends on a particular time, weekday, day of the month, or month.

  • For every N minutes, use a step value in the minute field.
  • For a specific time, specify the minute and hour directly.
  • For several times, use comma-separated values.
  • For continuous periods, use ranges.
  • For weekdays, restrict the day-of-week field.
  • For monthly jobs, restrict the day-of-month field.
  • For annual jobs, restrict both the day-of-month and month fields.

Cron Expressions for Backups

Backups are one of the most common uses for cron. A simple daily backup might run during a low-traffic period:

0 2 * * *

A weekly backup could instead run early Sunday morning:

0 3 * * 0
💡 A cron schedule only determines when a command starts. A reliable backup strategy should also consider failures, retention, storage capacity, encryption, monitoring, and whether the backup can actually be restored.

Cron Expressions for Reports

Scheduled reports often work well with fixed daily or weekly times. For example, a weekday report can run shortly before the working day begins:

30 8 * * 1-5

A weekly report can be generated every Monday morning:

0 9 * * 1

Cron Expressions for Monitoring

Lightweight health checks or synchronization tasks may need to run frequently. A common example is every five minutes:

*/5 * * * *

The appropriate frequency depends on the importance of the check and the cost of running it. Monitoring commands should also have sensible timeouts so that one failed execution does not create a backlog of overlapping work.

Avoiding Overlapping Cron Jobs

Cron can start a new execution even if a previous invocation of the same command is still running. For long-running jobs, this can result in multiple concurrent processes and unexpected load.

If a task can take longer than its scheduling interval, consider using an appropriate locking mechanism or a scheduler designed to coordinate job execution.

Cron and Time Zones

A cron expression does not inherently mean a universal UTC time. The actual execution time depends on the scheduler and its configured time zone.

This becomes particularly important for applications serving users in multiple regions. A job intended to run at midnight local time may need explicit time-zone handling rather than relying on the server's default zone.

Checking Your Cron Expression

Before deploying a schedule, verify both its syntax and its resulting execution times. A cron expression can be syntactically valid while still expressing the wrong schedule.

  • Parse the expression to confirm the meaning of each field.
  • Validate the expression against the target cron implementation.
  • Calculate the next several execution times.
  • Check the server or scheduler time zone.
  • Confirm that the command can safely run at the selected frequency.

Examples That Are Easy to Misread

Some expressions look intuitive but can have surprising results if the fields are confused. For example:

5 2 * * *

This means 02:05 every day, not every two hours and five minutes. The first field is minutes, while the second field is hours.

0 */2 * * *

This means every two hours at minute 0. It is different from 0 2 * * *, which means 02:00 once per day.

Cron vs Exact Intervals

Expressions such as */15 are often described as running every 15 minutes, but they represent matching calendar minutes. They select 0, 15, 30, and 45 rather than measuring exactly 15 minutes from the previous process execution.

This distinction matters if a job is delayed, takes a long time to finish, or the scheduler is temporarily unavailable.

Cron Expression Examples by Frequency

FrequencyExampleExpression
Every 5 minutesPeriodic check*/5 * * * *
Every hourHourly task0 * * * *
Every dayDaily maintenance0 2 * * *
WeekdaysWorkday report0 9 * * 1-5
WeeklySunday backup0 3 * * 0
MonthlyFirst-day task0 0 1 * *
YearlyAnnual task0 0 1 1 *

Best Practices for Cron Schedules

  • Keep expressions simple and readable whenever possible.
  • Document unusual schedules with comments.
  • Verify the next execution time before deployment.
  • Check the scheduler's supported cron dialect.
  • Account for the server or configured time zone.
  • Prevent overlapping executions for long-running jobs.
  • Make important jobs observable and report failures.
  • Avoid unnecessarily frequent schedules.
What is a common cron expression for every 5 minutes?

The traditional expression is */5 * * * *. It matches minutes 0, 5, 10, 15, and so on through 55 of every hour.

What cron expression runs every hour?

0 * * * * runs at minute 0 of every hour.

What cron expression runs every day at midnight?

0 0 * * * runs once per day at 00:00 according to the scheduler's applicable time zone.

What cron expression runs every weekday at 9 AM?

0 9 * * 1-5 commonly represents 09:00 from Monday through Friday in the traditional five-field format.

What cron expression runs on the first day of every month?

0 0 1 * * runs at midnight on the first day of every month.

What cron expression runs once a year?

0 0 1 1 * runs at midnight on January 1 each year.

How can I check when a cron expression will run next?

Use a cron next-run calculator or parser to calculate upcoming execution times and confirm that they match the intended schedule.

Conclusion

Most recurring tasks can be expressed using a small set of cron patterns. Asterisks represent unrestricted fields, commas create lists, hyphens create ranges, and slashes create regular steps. Combining these operators lets you describe schedules ranging from every few minutes to once per year.

The safest approach is to describe the desired schedule in plain language first, convert it into a cron expression, and then verify the resulting execution times. When a schedule is important, also consider time zones, daylight saving changes, job duration, failures, and overlapping executions.

Found an issue?

Found an error, outdated information, or something missing from this article? Let me know through the Contact page.

Your feedback helps improve our articles and keep them accurate and useful.