Cron Expression Tool

Validate, parse, and understand cron expressions with human-readable descriptions

Loading...

About Cron Expressions

A cron expression is a string that defines a schedule for recurring tasks in Unix-like operating systems. It consists of five fields separated by spaces, each representing a time unit.

Format:

minute hour day month weekday
Minute
0-59
Hour
0-23
Day
1-31
Month
1-12
Weekday
0-7

Field Details:

  • Minute (0-59): The minute of the hour when the task runs
  • Hour (0-23): The hour of the day in 24-hour format (0 = midnight, 23 = 11 PM)
  • Day (1-31): The day of the month (1 = first day, 31 = last day)
  • Month (1-12): The month of the year (1 = January, 12 = December)
  • Weekday (0-7): The day of the week (0 or 7 = Sunday, 1 = Monday, ..., 6 = Saturday)

Special Characters:

*
Asterisk - Matches any value in the field
Example: * * * * * runs every minute
,
Comma - Separates multiple specific values
Example: 0 9,17 * * * runs at 9 AM and 5 PM
-
Hyphen - Defines a range of values
Example: 0 9 * * 1-5 runs weekdays at 9 AM
/
Slash - Defines step values (increments)
Example: */15 * * * * runs every 15 minutes

Common Examples:

0 0 * * *
Daily at midnight
Runs every day at 12:00 AM
0 9 * * 1-5
Weekdays at 9 AM
Runs Monday through Friday at 9:00 AM
0 0 1 * *
First day of month
Runs at midnight on the 1st of every month
*/30 * * * *
Every 30 minutes
Runs every 30 minutes throughout the day

Shorthands:

A schedule can also be written as a single word. The first six are the nicknames Unix cron itself understands; the last four are extensions, so check your scheduler takes them before relying on one.

@yearly
Midnight on 1 January
Same as 0 0 1 1 *
@annually
Another word for @yearly
Same as 0 0 1 1 *
@monthly
Midnight on the 1st of every month
Same as 0 0 1 * *
@weekly
Midnight on Sunday
Same as 0 0 * * 0
@daily
Midnight, every day
Same as 0 0 * * *
@hourly
The top of every hour
Same as 0 * * * *
@minutely
Every minute
Same as * * * * * (an extension, not standard cron)
@secondly
Every second, using the seconds field
Same as * * * * * * (an extension, not standard cron)
@weekdays
Midnight, Monday through Friday
Same as 0 0 * * 1-5 (an extension, not standard cron)
@weekends
Midnight, Saturday and Sunday
Same as 0 0 * * 0,6 (an extension, not standard cron)

Two nicknames real cron has are not here. @reboot names an event rather than a time, so there is no next run to show, and @midnight, which is only another word for @daily, is one the parser behind this tool does not take.

Tips & Best Practices:

  • Always use 24-hour format for hours (0-23)
  • Weekday 0 and 7 both represent Sunday for compatibility
  • Be careful with day and weekday fields - both can be specified, but they work as "OR" (either condition)
  • Test your cron expressions before deploying to production
  • Consider timezone differences when scheduling tasks
  • Use this tool to validate and preview execution times before setting up your cron job