quartz timing

quartz timed task time setting

 

These asterisks are represented in order from left to right: * * * * * * *       Format :                               [seconds] [minutes] [hours] [days] [months] [weeks] [years] Allowed wildcards 1 second is 0-59 , - * / 2 minutes is 0-59    , - * / 3 hours is 0-23 , - * / 4 days is 1-31 , - * ? / LW May is 1- 12 or JAN-DEC , - * / 6 weeks yes 1-7 or SUN-SAT , - * ? / L # 7 years no empty or 1970-2099 , - * / Wildcard Description: * means all values. For example: in the div "*" is set on the field of , which means that it will be triggered every minute. ? means no value is specified. The use case is that you don't need to care about the value of the current setting of this field. For example: to trigger an operation on the 10th of each month, but don't care about the day of the week, so the field that needs the week position is set to "?" Specifically set to 0 0 0 10 * ? - to indicate the interval. For example, setting "10-12" on the hour means that it will be triggered at 10, 11, and 12 o'clock. , means specifying multiple values, for example, setting "MON,WED,FRI" on the week field means triggering on Monday, Wednesday and Friday 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/ for incremental triggering. If "5/15" is set on the second, it starts from 5 seconds and triggers every 15 seconds (5, 20, 35, 50). Set '1/3' on the month field to start on the 1st of each month and trigger every three days. L means the last. On the day field setting, it means the last day of the current month (according to the current month, if it is February, it will also depend on whether it is a leap year [leap]), and on the week field it means Saturday, which is equivalent to "7" or "SAT". If you add a number before "L", it means the last of the data. For example, if the format of "6L" is set on the week field, it means "the last Friday of the month" W means the nearest working day (Monday to Friday) from the specified date. For example, if "15W" is set on the day field, it means Triggered on the working day closest to the 15th of each month. If the 15th happens to be Saturday, it will trigger on the nearest Friday (14th), if the 15th is a weekday, it will trigger on the nearest next Monday (16th). If the 15th happens to be on a working day (Monday to Weekly) 5), it will be triggered on that day. If the specified format is "1W", it means that it will be triggered on the nearest working day after the 1st of each month. If the 1st falls on a Saturday, it will trigger on the following Monday, the 3rd. (Note, only specific numbers can be set before "W", and the interval "-" is not allowed). Tips 'L' and 'W' can be used in combination. If "LW" is set on the day field, it means that it will be triggered on the last working day of the month (generally refers to the payment of wages) # Serial number (indicates the day of the month), for example, set "6#" on the week field 3" means on the third Saturday of every month. Note that if "#5" is specified, and there is no Saturday in the fifth week, this configuration will not be triggered (it's perfect for Mother's Day and Father's Day) Tips The setting of the week field, if English letters are used, is case-insensitive. MON is the same as mon. 
 
 
 
 
 
 
 
 
 
 
 
0 15 10 * * ? * Every day at 10:15 0 15 10 * * ? 2005 2005 Every day at 10:15 0 * 14 * * ? Every day from 2:00 to 2:59 in the afternoon 0 0/ 5 14 * * ? Every day from 2:00 to 2:59 pm (starts on the hour, triggers every 5 minutes) 0 0/5 14,18 * * ? Every day from 2:00 to 2:59 pm (starts on the hour , trigger every 5 minutes) every day from 18:00 to 18:59 in the afternoon (start on the hour, trigger every 5 minutes) 0 0-5 14 * * ? Every day from 2:00 to 2:05 in the afternoon to trigger 0 every minute 10,44 14 ? 3 WED Triggered every Wednesday at 2:10 pm and 2:44 pm in March (special cases, when executed twice or more in a time setting) 0 59 2 ? * FRI Triggered every Friday at 2:59am; 0 15 10 ? *MON-FRI Triggered at 10:15am every day from Monday to Friday 0 15 10 15 * ? Triggered at 10:15 am on the 15th of every month L * ? Triggered at 10:15 on the last day of every month 15 10 ? * 6L Triggered at 10:15 on Friday of the last week of every month 0 15 10 ? * 6L 2002-2005 Last week of every month from 2002 to 2005 Triggered at 10:15 on Friday of 0 15 10 ? * 6#3 Triggered on Friday of the third week of each month 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0 0 12 1/5 * ? Trigger every 5 days from the first noon of every month 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326701211&siteId=291194637
Recommended