Croz cron expression

Source: Internet
Author: User

The cron expression of quartz is in the order of seconds (0 ~ 59) minutes (0 ~ 59) hour (0 ~ 23) days (months) (0 ~ 31, but you need to consider the number of days of your month) month (0 ~ 11) Day (week) (1 ~ 7 1 = sun, Mon, Tue, wed, Thu, Fri, SAT) 7. year (1970-2099), where each element can be a value (for example, 6), a continuous interval (9-12), and an interval (8-18/4) (/indicates every 4 hours), a list (1, 3, 5), wildcard. Because the two elements "date in the month" and "date in the week" are mutually exclusive, one of them must be set ?. 0 0 10, 14, 16 **? Ten o'clock A.M., two o'clock P.M., 0/30 9-17 **? In the working hours of the 9-to-5 period, 0 0 12? * Wed indicates that at every Wednesday some subexpressions can contain some scopes or lists such as: subexpressions (days (Weeks) can be "MON-FRI", "mon, wed, fri "," MON-WED, sat "" * "represents all possible values. Therefore," * "represents the meaning of each month in a subexpression (month, "*" represents every day of the week in the subexpression (Day (week) "/" to specify the increment of the value, for example, in the subexpression (minute) "0/15" indicates that the time starts from 0th minutes, and "3/20" in the subexpression (minute) every 15 minutes indicates that the time starts from 3rd minutes, every 20 minutes (IT and "3, 23, 43 ") The meaning is the same as"?" The character is only used for two subexpressions: Day (month) and day (week), indicating that no value is specified. When one of the two subexpressions is specified, in order to avoid conflict, you need to set the value of another subexpression to "?" The "L" character is only used for two subexpressions: Day (month) and day (week). It is short for the word "last", but it has different meanings in two subexpressions. In the subexpression of "month", "L" indicates the last day of a month in the self expression of "Week". "L" indicates the last day of a week, that is, if the SAT has specific content before "L", it has other meanings. For example, "6l" indicates the last 6th days of the month, "fril" indicates the last Friday of the month. Note: when using the "L" parameter, do not specify the list or range, as this will cause the problem to be attached: cronexpression configuration description the values of the allowed special characters in the field are 0-59,-*/0-59,-*/hour 0-23,-*/date 1-31, -*? /L w c Month 1-12 or JAN-DEC,-*/week 1-7 or sun-Sat ,-*? /L c # (optional) leave blank, 1970-2099,-*/expression meaning "0 0 12 **? "Triggered at 12 noon every day" 0 15 10? ** "Triggered at every morning" 0 15 10 **? "Triggered at every morning" 0 15 10 **? * "Triggered at every morning" 0 15 10 **? 2005 "triggered at AM on July 15, 2005" 0*14 **? "Triggered every 1 minute from two o'clock P.M. to every day" 0 0/5 14 **? "Triggered every 5 minutes from two o'clock P.M. to every day" 0 0/5 **? "Triggered every 5 minutes between two o'clock P.M. to six o'clock P.M. and to each day" 0 0-5 14 **? "Triggered every 1 minute from two o'clock P.M. to every day" 0? 3 wed "triggered at and on Wednesday, January 1, March" 0 15 10? * MON-FRI "triggered at am from Monday to Friday" 0 15 10 15 *? "Triggered at AM on the 15th day of every month" 0 15 10 L *? "Triggered at AM on the last day of each month" 0 15 10? * 6l "triggered at AM on the last Friday of every month" 0 15 10? * 6l 2002-2005 "Trigger" 0 15 10? * 6 #3 "trigger special character meaning * on the third Friday of every month at am indicates all values ;? Indicates an unspecified value, that is, the value that does not care about it.-indicates a specified range, indicating that a possible value is appended./indicates the start time before the symbol, after the symbol, it indicates the value of each increment. L ("last") ("last") "L" is used in the day-of-month field to indicate "the last day of this month "; it is used in the day-of-week field, which simply means "7" or "sat ". If the day-of-week field is used together with a number, it means "the last day of the week of the month"-for example: "6l" means "the last Friday of this month ". when we use "L", it is very important not to specify a list value or range. Otherwise, we will get some unexpected results. W ("weekday") can only be used in the day-of-month field. Used to describe the workdays closest to the specified day (Monday to Friday ). For example, in the day-of-month field, "15 W" indicates "the workday closest to the 15th day of the month", that is, if the 15th day of the month is Saturday, the trigger will be triggered on the first day of the month, that is, Friday. If the first day of the month is Sunday, the trigger will be triggered on the second day of the month, that is, Monday; if the first day of this month is Tuesday, the trigger will be triggered on this day. Note: This method only calculates the value in the current month and does not overwrite the current month. The "W" character can only indicate a day in day-of-month, and cannot be a range or list. You can also use "LW" to specify the last workday of the month. # It can only be used in the day-of-week field. Specifies the week number of the month. For example, in the day-of-week field, use "6 #3" to indicate the first Friday of the month (6 to Friday, 3 to 3rd ). If the specified date does not exist, the trigger will not be triggered. C Indicates the value that has been calculated after the contact with calendar. For example, in the day-of-month field, "5c" indicates the first day of the month that includes the calendar day; in the day-of-week field, use "1C" to indicate the first day of the calendar on or after this Sunday.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.