锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="targetObject"聽(tīng)ref="smsService"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="targetMethod"聽(tīng)value="sendAllUnsentMessage"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)id="monitorJobDetail"聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="targetObject"聽(tīng)ref="smsClientMonitor"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="targetMethod"聽(tīng)value="monitor"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)id="sendTrigger"聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)class="org.springframework.scheduling.quartz.SimpleTriggerBean">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="jobDetail"聽(tīng)ref="sendJobDetail"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="startDelay"聽(tīng)value="${sendTrigger.startDelay}"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="repeatInterval"聽(tīng)value="${sendTrigger.repeatInterval}"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)id="monitorTrigger"聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)class="org.springframework.scheduling.quartz.CronTriggerBean">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="jobDetail"聽(tīng)ref="monitorJobDetail"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="cronExpression"聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)value="${monitorTrigger.cronExpression}"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)<bean聽(tīng)class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<property聽(tīng)name="triggers">
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<list>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<ref聽(tīng)bean="sendTrigger"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)<ref聽(tīng)bean="monitorTrigger"/>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</list>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)</property>
聽(tīng)聽(tīng)聽(tīng)聽(tīng)</bean>
瀛楁 | 聽(tīng) | 鍏佽鍊?/th> | 聽(tīng) | 鍏佽鐨勭壒孌婂瓧絎?/th> |
---|---|---|---|---|
縐?/code>
|
聽(tīng) |
0-59
|
聽(tīng) |
, - * /
|
鍒?/code>
|
聽(tīng) |
0-59
|
聽(tīng) |
, - * /
|
灝忔椂
|
聽(tīng) |
0-23
|
聽(tīng) |
, - * /
|
鏃ユ湡
|
聽(tīng) |
1-31
|
聽(tīng) |
, - * ? / L W C
|
鏈堜喚
|
聽(tīng) |
1-12聽(tīng)鎴栬?JAN-DEC
|
聽(tīng) |
, - * /
|
鏄熸湡
|
聽(tīng) |
1-7聽(tīng)鎴栬?SUN-SAT
|
聽(tīng) |
, - * ? / L C #
|
騫達(dá)紙鍙夛級(jí)
|
聽(tīng) |
鐣欑┖, 1970-2099
|
聽(tīng) |
, - * /
|
The '*' character is used to specify all values. For example, "*" in the minute field means "every minute".
鈥?鈥濆瓧絎﹁鐢ㄦ潵鎸囧畾鎵鏈夌殑鍊箋傚錛氣?鈥滃湪鍒嗛挓鐨勫瓧孌靛煙閲岃〃紺衡滄瘡鍒嗛挓鈥濄?
The '?' character is allowed for the day-of-month and day-of-week fields. It is used to specify 'no specific value'. This is useful when you need to specify something in one of the two fileds, but not the other. See the examples below for clarification.
鈥?鈥濆瓧絎﹀彧鍦ㄦ棩鏈熷煙鍜屾槦鏈熷煙涓嬌鐢ㄣ傚畠琚敤鏉ユ寚瀹氣滈潪鏄庣‘鐨勫尖濄傚綋浣犻渶瑕侀氳繃鍦ㄨ繖涓や釜鍩熶腑鐨勪竴涓潵鎸囧畾涓浜涗笢瑗跨殑鏃跺欙紝瀹冩槸鏈夌敤鐨勩傜湅涓嬮潰鐨勪緥瀛愪綘灝變細(xì)鏄庣櫧銆?
鏈堜喚涓殑鏃ユ湡鍜屾槦鏈熶腑鐨勬棩鏈熻繖涓や釜鍏冪礌鏃朵簰鏂ョ殑涓璧峰簲璇ラ氳繃璁劇疆涓涓棶鍙??)鏉ヨ〃鏄庝笉鎯寵緗偅涓瓧孌?br />
The '-' character is used to specify ranges For example "10-12" in the hour field means "the hours 10, 11 and 12".
鈥?鈥濆瓧絎﹁鐢ㄦ潵鎸囧畾涓涓寖鍥淬傚錛氣?0-12鈥濆湪灝忔椂鍩熸剰鍛崇潃鈥?0鐐廣?1鐐廣?2鐐光濄?
The ',' character is used to specify additional values. For example "MON,WED,FRI" in the day-of-week field means "the days Monday, Wednesday, and Friday".
鈥?鈥濆瓧絎﹁鐢ㄦ潵鎸囧畾鍙﹀鐨勫箋傚錛氣淢ON,WED,FRI鈥濆湪鏄熸湡鍩熼噷琛ㄧず鈥濇槦鏈熶竴銆佹槦鏈熶笁銆佹槦鏈熶簲鈥?
The '/' character is used to specify increments. For example "0/15" in the seconds field means "the seconds 0, 15, 30, and 45". And "5/15" in the seconds field means "the seconds 5, 20, 35, and 50". Specifying '*' before the '/' is equivalent to specifying 0 is the value to start with. Essentially, for each field in the expression, there is a set of numbers that can be turned on or off. For seconds and minutes, the numbers range from 0 to 59. For hours 0 to 23, for days of the month 0 to 31, and for months 1 to 12. The "/" character simply helps you turn on every "nth" value in the given set. Thus "7/6" in the month field only turns on month "7", it does NOT mean every 6th month, please note that subtlety.
The 'L' character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "last", but it has different meaning in each of the two fields. For example, the value "L" in the day-of-month field means "the last day of the month" - day 31 for January, day 28 for February on non-leap years. If used in the day-of-week field by itself, it simply means "7" or "SAT". But if used in the day-of-week field after another value, it means "the last xxx day of the month" - for example "6L" means "the last friday of the month". When using the 'L' option, it is important not to specify lists, or ranges of values, as you'll get confusing results.
L鏄榣ast鈥欑殑鐪佺暐鍐欐硶鍙互琛ㄧずday-of-month鍜宒ay-of-week鍩燂紝浣嗗湪涓や釜瀛楁涓殑鎰忔濅笉鍚岋紝渚嬪day-of-month鍩熶腑琛ㄧず涓涓湀鐨勬渶鍚庝竴澶╋紝
濡傛灉鍦╠ay-of-week鍩熻〃紺衡?鈥欐垨鑰呪楽AT鈥欙紝濡傛灉鍦╠ay-of-week鍩熶腑鍓嶉潰鍔犱笂鏁板瓧錛屽畠琛ㄧず涓涓湀鐨勬渶鍚庡嚑澶╋紝渚嬪鈥?L鈥欏氨琛ㄧず涓涓湀鐨勬渶鍚庝竴涓?br />鏄熸湡浜旓紝
The 'W' character is allowed for the day-of-month field. This character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify "15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month". So if the 15th is a Saturday, the trigger will fire on Friday the 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you specify "1W" as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only be specified when the day-of-month is a single day, not a range or list of days
.
The 'L' and 'W' characters can also be combined for the day-of-month expression to yield 'LW', which translates to "last weekday of the month".
The '#' character is allowed for the day-of-week field. This character is used to specify "the nth" XXX day of the month. For example, the value of "6#3" in the day-of-week field means the third Friday of the month (day 6 = Friday and "#3" = the 3rd one in the month). Other examples: "2#1" = the first Monday of the month and "4#5" = the fifth Wednesday of the month. Note that if you specify "#5" and there is not 5 of the given day-of-week in the month, then no firing will occur that month.
The 'C' character is allowed for the day-of-month and day-of-week fields. This character is short-hand for "calendar". This means values are calculated against the associated calendar, if any. If no calendar is associated, then it is equivalent to having an all-inclusive calendar. A value of "5C" in the day-of-month field means "the first day included by the calendar on or after the 5th". A value of "1C" in the day-of-week field means "the first day included by the calendar on or after sunday".
quartz鐨勯珮綰х壒鎬т笉浠呭姝?
1 鏁版嵁搴撳瓨鍌?
2 闆嗙兢鏀寔
3 鏁版嵁搴撴寔涔呭寲浠誨姟錛宼rigger
4 trigger 鐨勫仠姝紝榪愯
5 浠誨姟鐨勪換鎰忔坊鍔?
6 姣攃orntrigger 鏇磋灝界殑浠誨姟瀹夋帓
7 綰跨▼鐨勫唴閮ㄦ暟鎹氦鎹?/p>