Cron Expression

Cron expression generator & parser

秒分时日周年

Usage Guide

A Cron expression is a string consisting of 6 or 7 space-separated fields, each representing a time unit.

Field Meanings
#FieldValuesSpecial Chars
1Second0-59, - * /
2Minute0-59, - * /
3Hour0-23, - * /
4Day of Month1-31, - * / ? L W C
5Month1-12 or JAN-DEC, - * /
6Day of Week1-7 or SUN-SAT, - * / ? L C #
7Year1970-2099, - * /
Special Character Descriptions
  • * - Matches any value in the field
  • ? - Used only in day-of-month and day-of-week fields, means no specific value
  • - - Specifies a range
  • , - Specifies multiple values
  • / - Specifies increments
  • L - Last, used only in day-of-month and day-of-week fields
  • W - Weekday, used only in day-of-month field
  • # - Nth occurrence of a weekday, used only in day-of-week field
Common Expression Examples
  • 0 0 12 * * ? - Fire at 12:00 PM every day
  • 0 15 10 ? * * - Fire at 10:15 AM every day
  • 0 15 10 * * ? - Fire at 10:15 AM every day
  • 0 15 10 * * ? * - Fire at 10:15 AM every day
  • 0 15 10 * * ? 2026 - Fire at 10:15 AM every day in 2026
  • 0 * 14 * * ? - Fire every minute from 2:00 PM to 2:59 PM every day
  • 0 0/5 14 * * ? - Fire every 5 minutes from 2:00 PM to 2:55 PM every day
  • 0 0/5 14,18 * * ? - Fire every 5 minutes from 2:00 PM to 2:55 PM and 6:00 PM to 6:55 PM every day

常见问题

相关工具