A cron expression has at least 6 (or possibly 7) time elements that have a space separation. In order 1. Seconds (0~59) 2. Minutes (0~59) 3. Hours (0~23) 4. Day (month) (0~31, but you need to consider the number of days in your month) 5. Month (0~11) 6. Day (week) (1~7 1=sun or Sun,mon,tue,wed,thu,fri, SAT) 7. Year (1970-2099) Each of these elements can be a value (such as 6), a continuous interval (9-12), a time interval (8-18/4) (/= every 4 hours), a list (1,3,5), and a wildcard character. Because the "date in the month" and "date in the week" are mutually exclusive, one of the two elements must be set. 0 0 10,14,16 * *? Daily 10 o'clock in the morning, 2 o'clock in the afternoon, 4 points 0 0/30 9-17 * *??? Nine to five working hours every half hour 0 0 12? * WED means every Wednesday noon 12 o'clock some sub-expressions can contain ranges or lists such as: Sub-expressions (days (weeks)) can be "Mon-fri", "Mon,wed,fri", "Mon-wed,sat" "*" characters represent all possible values therefore, "*" In the subexpression (month) represents the meaning of each month, "*" in the subexpression (Day (week)) that represents the day of the Week "/" character is used to specify the increment of the numeric value for example: "0/15" in the sub-expression (minutes) means starting from the No. 0 minute, every 15 minutes, in the sub-expression (minutes) That means starting from the 3rd minute, every 20 minutes (it's the same as "3,23,43")? "Character is used only for days (months) and days (weeks) two sub-expressions, indicating that no worth 2 sub-expressions are specified after one of the values has been specified, in order to avoid a conflict, the value of another subexpression needs to be set to"? The "L" character is used only for days (months) and days (weeks) of two sub-expressions, which is the abbreviation of the word "last" but it has a different meaning in two sub-expressions. In the day (month) subexpression, "L" represents the last day of one months, and in the day (week) Self-expression, "L" represents the last day of one weeks, that is, if the SAT has specific content before "L", it has other meanings, for example: "6L" means the 6th day of the month, "Fril" The last Friday of the month Note: When using the "L" parameter, do not specify a list or range, because this causes the problem ============================================crontrigger configuration full format: [sec] [min] [hours] [day] [month] [week] [year] serial number description is required Allowed wildcard characters allowed to fill in 1 seconds is 0-59,-*/2 points is 0-59,-*/3 hours is 0-23,-*/4th is 1-31,-*? /L W May is 1-12 or JAN-DEC,-*/6 weeks is 1-7 or SUN-SAT,-*? /L # 7 years no empty or 1970-2099,-*/Wildcard Description: * denotes all values. For example: Setting "*" on a divided field means that every minute is triggered. Indicates that no value is specified. Use the scene as a value that does not need to be concerned with the current setting of this field. For example: to trigger an action at number 10th per month, but do not care about the weeks, so the field that needs the week position is set to "?" setting to 0 0 0 10 *?-Indicates the interval. For example, setting "10-12" on the hour indicates that the 10,11,12 point will be triggered. , which indicates that multiple values are specified, such as setting "Mon,wed,fri" on the week field to indicate Monday, Wednesday, and Friday triggers/used to increment the trigger. If you set "5/15" above the second, the trigger (5,20,35,50) starts at 5 seconds, every 15 seconds. The month field is set to start at ' 1/3 ' as shown in month 1th and is triggered every three days. L indicate the last meaning. On the day field setting, the last day of the month (according to the current month, if February is also based on whether it is run year [leap]), the week field represents Saturday, which is equivalent to "7" or "SAT". If you precede the "L" with a number, it represents the last of the data. For example, setting the format "6L" On the week field means "last Friday of the month" W represents the most recent working day from the specified date (Monday to Friday). For example, set "15W" on the day field, which indicates the most recent day of the month from 15th. If the number 15th is exactly Saturday, then find the most recent Friday (14th) trigger, if 15th is a week, then find the nearest next Monday (16th) trigger. If the number 15th is on the weekday (Monday to Friday), it will be triggered on that day. If the specified format is "1W", it represents the next most recent weekday trigger of 1th per month. If the number 1th is Saturday, it will be triggered by the number 3rd in Monday. (Note, "W" can only be set before the specificNumber, do not allow interval "-"). # ordinal (indicates the number of weeks of the month), for example, setting "6#3" On the Week field indicates the third Saturday of the month. Note If you specify "#5", which does not happen in the fifth week of Saturday, the configuration will not be triggered (for Mother's Day and Father's Day); ' W ' can be used in a combination. If "LW" is set on the day field, it is triggered on the last working day of the month, and the week field is not case-sensitive, that is, Mon is the same as Mon; common example: 0 0 12 * *? 12-point Trigger 0 15 10 per day? * * Daily 10:15 Trigger 0 15 10 * *? Trigger 0 15 10 * * per day 10:15? * Daily 10:15 Trigger 0 15 10 * *? 2005 2005 Daily 10:15 Trigger 0 * 14 * *? Every afternoon from 2 to 2:59 per minute trigger 0 0/5 14 * *? Every afternoon from 2 to 2:59 (the whole point starts, every 5 minutes trigger) 0 0/5 14,18 * *? Every afternoon from 2 to 2:59, 18 to 18:59 (the whole point starts, every 5 points trigger) 0 0-5 14 * *? 0 10,44 14 per minute from 2 to 2:05 every afternoon? 3 WED March every Wednesday pm 2:10 and 2:44 trigger 0 15 10? * Mon-fri from Monday to Friday every morning 10:15 trigger 0 15 10 15 *? 15th 10:15 A.M. per month, trigger 0 L *? 10:15 trigger on the last day of the month 0 15 10? * 6L of the last week of the month of Friday 10:15 trigger 0 15 10? * 6L 2002-2005 from 2002 to 2005 the last week of the month of Friday 10:15 trigger 0 15 10? * 6#3 starts in Friday of the third week of the month 0 0 12 1/5 *? The first noon of each month starts every 5 days and triggers 0 11 11 11 11? Every November 11 11:11 trigger (Singles Day)
Timer Corn Expression