锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲中文久久精品无码ww16,亚洲另类无码专区首页,国产V亚洲V天堂A无码http://www.tkk7.com/stevenjohn/category/52416.html閭d簺闈掓槬鐨勫瞾鏈?/description>zh-cnSun, 26 Jul 2015 19:18:47 GMTSun, 26 Jul 2015 19:18:47 GMT60Quartz 騫跺彂http://www.tkk7.com/stevenjohn/archive/2015/07/26/426425.htmlabinabinSat, 25 Jul 2015 17:39:00 GMThttp://www.tkk7.com/stevenjohn/archive/2015/07/26/426425.htmlhttp://www.tkk7.com/stevenjohn/comments/426425.htmlhttp://www.tkk7.com/stevenjohn/archive/2015/07/26/426425.html#Feedback0http://www.tkk7.com/stevenjohn/comments/commentRss/426425.htmlhttp://www.tkk7.com/stevenjohn/services/trackbacks/426425.html1銆?/span>StatefulJob
implements StatefulJob浣縅ob鎴愪負鏈夌姸鎬佺殑錛岄『搴忔墽琛?nbsp;
鍚屼竴涓湁鐘舵佺殑job瀹炰緥涓嶅瓨鍦ㄥ茍鍙戯紝鏃犵姸鎬佺殑job鐨勫茍鍙戞暟鐢變笂闈㈤厤緗殑綰跨▼鏁板喅瀹氥備笉鎯沖茍鍙戠殑璇濓紝璁劇疆鎴?錛岀浜屼釜綰跨▼鍦ㄥ墠涓涓墽琛屽畬浠ュ悗瑙﹀彂鎵ц銆?/span>
綰跨▼鏁板ぇ浜?鏃訛紝濡傛灉瀛樺湪絀洪棽綰跨▼錛屽垯鍒版墽琛屾椂闂寸偣鍗寵Е鍙戞墽琛屻?/span>

2銆?/span>MethodInvokingJobDetailFactoryBean
MethodInvokingJobDetailFactoryBean鐨勫茍鍙戦棶棰?/div>
澶у鍦ㄤ嬌鐢╭uartz鐨勬椂鍊欙紝涓鑸彧璁劇疆浜?#8220;targetObject”鍜?#8220;targetMethod”錛孧ethodInvokingJobDetailFactoryBean綾婚粯璁ゆ槸騫跺彂鎵ц鐨勶紝榪欐椂鍊欏鏋滀笉璁劇疆“concurrent”涓篺alse錛屽緢鍙兘甯︽潵騫跺彂鎴栬呮閿佺殑闂錛岃屼笖鍑犵巼杈冨皬錛屼笉瀹規槗澶嶇幇錛岃澶у浣跨敤鐨勬椂鍊欐敞鎰忚緗?#8220;concurrent”銆?/div>
 
    <bean id="cpm.MessageJobFactoryBean" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="cpm.MessageJob"/>
        <property name="targetMethod" value="execute"/>
        <property name="concurrent" value="false"/>
    </bean>
concurrent   鍚屾椂鍙戠敓
 concurrent錛氬浜庣浉鍚岀殑JobDetail錛屽綋鎸囧畾澶氫釜Trigger鏃? 寰堝彲鑳界涓涓猨ob瀹屾垚涔嬪墠錛岀浜屼釜job灝卞紑濮嬩簡銆?/div>
 瀹歝oncurrent璁句負false錛屽涓猨ob涓嶄細騫跺彂榪愯錛岀浜屼釜job灝嗕笉浼氬湪絎竴涓猨ob瀹屾垚涔嬪墠寮濮?/div>



闃叉job騫惰榪愯鐨勫嚑縐嶈В鍐蟲柟妗?nbsp;
涓銆丣OB State 
鍦ㄩ氳繃MethodInvokingJobDetailFactoryBean鍦ㄨ繍琛屼腑鍔ㄦ佺敓鎴愮殑Job錛岄厤緗殑xml鏂囦歡鏈変釜concurrent灞炴э紝琛ㄧずjob鏄惁鍙互騫惰榪愯錛氬鏋滀竴涓猨ob鐨勪笟鍔″鐞嗗彂璐圭殑鏃墮棿瓚呰繃浜唈ob鐨勫惎鍔ㄧ殑闂撮殧鏃墮棿錛坮epeatInterval)錛岃繖涓睘鎬ч潪甯告湁鐢ㄣ傚鏋滀負false錛岄偅涔堬紝鍦ㄨ繖縐嶆儏鍐典笅錛屽綋鍓峧ob榪樺湪榪愯錛岄偅涔堜笅涓涓猨ob鍙兘寤舵椂榪愯銆傚鏋滀負true錛岄偅涔坖ob灝變細騫惰榪愯銆傚湪瀹為檯鐨勫簲鐢ㄤ腑搴旇閰嶇疆涓簍rue/false錛岃鏍規嵁闇瑕佷簡錛堝簾璇濓級銆?nbsp;
浜屻佸鏋滈氳繃緇ф壙QuartzJobBean瀹炵幇job鐨勮瘽錛岄粯璁ゆ儏鍐典笅QuartzJobBean鏄痠mplements org.quartz.Job鎺ュ彛鐨勶紝涔熷氨鏄job紺轟緥鏄痵tateless鐨勶紝浼氬嚭鐜板墠闈㈡墍榪扮殑騫惰鎯呭喌銆傝屼唬鐮佷腑鍗磋姹俲ob浠誨姟蹇呴渶涓茶錛岃В鍐沖姙娉曪細鍦╦ob瀛愮被涓戶緇璱mplements org.quartz.StatefulJob銆傞偅涔堣繖涓猨ob瀹炰緥鍙樻垚浜哠tateful錛宩ob浠誨姟涔熷氨鏄覆琛岀殑浜嗐?/div>
娉細 
鍦≦uartz涓紝濡傛灉瀹炵幇org.quartz.Job鎺ュ彛錛岄偅涔堣繖涓猨ob鏄痵tateless鐨勶紝job瀹炰緥鐨勫弬鏁頒笉鑳藉湪澶氫釜浠誨姟涔嬮棿鍏變韓錛屽鏋滃疄鐜皁rg.quartz.StatefulJob錛岃繖涓猨ob鏄釜鍗曚緥鐨勶紝job瀹炰緥鐨勫睘鎬у彲浠ヤ粠褰撳墠浠誨姟浼犻掑埌涓嬩竴涓換鍔°?nbsp;


spring鍜宷uartz鐨勬暣鍚堝鐗堟湰鏄湁瑕佹眰鐨勩?/div>
spring3.1浠ヤ笅鐨勭増鏈繀欏諱嬌鐢╭uartz1.x緋誨垪錛?.1浠ヤ笂鐨勭増鏈墠鏀寔quartz 2.x錛屼笉鐒朵細鍑洪敊銆?/div>
鑷充簬鍘熷洜錛屽垯鏄痵pring瀵逛簬quartz鐨勬敮鎸佸疄鐜幫紝org.springframework.scheduling.quartz.CronTriggerBean緇ф壙浜唎rg.quartz.CronTrigger錛屽湪quartz1.x緋誨垪涓璷rg.quartz.CronTrigger鏄釜綾伙紝鑰屽湪quartz2.x緋誨垪涓璷rg.quartz.CronTrigger鍙樻垚浜嗘帴鍙o紝浠庤岄犳垚鏃犳硶鐢╯pring鐨勬柟寮忛厤緗畄uartz鐨勮Е鍙戝櫒錛坱rigger錛夈?br />
鍦⊿pring涓嬌鐢≦uartz鏈変袱縐嶆柟寮忓疄鐜幫細絎竴縐嶆槸浠誨姟綾葷戶鎵縌uartzJobBean錛岀浜岀鍒欐槸鍦ㄩ厤緗枃浠墮噷瀹氫箟浠誨姟綾誨拰瑕佹墽琛岀殑鏂規硶錛岀被鍜屾柟娉曞彲浠ユ槸鏅氱被銆傚緢鏄劇劧錛岀浜岀鏂瑰紡榪滄瘮絎竴縐嶆柟寮忔潵鐨勭伒媧匯?/div>


MethodInvokingJobDetailFactoryBean涓璫oncurrent鍜宻houldRecover灞炴х殑浣滅敤
瑙i噴 concurrent涓簍rue錛屽垯鍏佽涓涓猀uartzJob騫跺彂鎵ц錛屽惁鍒欏氨鏄『搴忔墽琛屻備緥濡俀uartzJob A鎵ц鏃墮棿涓?5縐掞紝閰嶇疆涓烘瘡10縐掓墽琛屼竴嬈★紱濡傛灉concurrent涓簍rue錛屽垯0縐掔殑鏃跺欏惎鍔ㄤ竴嬈錛?0縐掔殑鏃跺欏啀鍚姩涓嬈錛?0縐掔殑鏃跺欏啀鍚姩涓嬈錛屼笉綆″墠闈㈠惎鍔ㄧ殑A鏈夋病鏈夋墽琛屽畬錛涘鏋渃oncurrent涓篺alse錛屽垯0縐掔殑鏃跺欏惎鍔ㄤ竴嬈錛?5縐掔殑鏃跺橝鎵ц瀹屾瘯錛屽啀絎簩嬈″惎鍔ˋ銆?
shouldRecover灞炴т負true錛屽垯褰換uartz鏈嶅姟琚腑姝㈠悗錛屽啀嬈″惎鍔ㄦ垨闆嗙兢涓叾浠栨満鍣ㄦ帴鎵嬩換鍔℃椂浼氬皾璇曟仮澶嶆墽琛屼箣鍓嶆湭瀹屾垚鐨勬墍鏈変換鍔°備緥濡俀uartzJob B錛屽湪姣忔00縐掔殑鏃跺欏惎鍔紝鍋囧鍦?3:00鐨勪換鍔℃墽琛屽畬涔嬪悗鏈嶅姟鍣?琚腑姝紝鏈嶅姟鍣?鍦?5:15鐨勬椂鍊欐墠鎺ユ墜錛涘鏋渟houldRecover灞炴т負true錛屽垯鏈嶅姟鍣?浼氬皾璇曠潃琛ュ洖鍘熸潵鍦?4:00鍜?5:00鐨勬椂鍊欏簲璇ュ仛鐨勪換鍔★紝濡傛灉shouldRecover灞炴т負false錛屽垯鏈嶅姟鍣?鍙細浠?6:00鐨勬椂鍊欏啀鎵цB銆?br />

Quartz闆嗙兢鍙敮鎸丣DBCJobStore瀛樺偍鏂瑰紡錛岃孧ethodInvokingJobDetailFactoryBean涓嶈兘搴忓垪鍖栧瓨鍌╦ob鏁版嵁鍒版暟鎹簱錛?/pre>
閲嶅啓 quartz 鐨?QuartzJobBean 綾?nbsp;
鍘熷洜鏄湪浣跨敤 quartz+spring 鎶?quartz 鐨?task 瀹炰緥鍖栬繘鍏ユ暟鎹簱鏃訛紝浼氫駭鐢燂細 serializable 鐨勯敊璇紝鍘熷洜鍦ㄤ簬錛?/div>
榪欎釜 MethodInvokingJobDetailFactoryBean 綾諱腑鐨?methodInvoking 鏂規硶錛屾槸涓嶆敮鎸佸簭鍒楀寲鐨勶紝鍥犳鍦ㄦ妸 QUARTZ 鐨?TASK 搴忓垪鍖栬繘鍏ユ暟鎹簱鏃跺氨浼氭姏閿欍傜綉涓婃湁璇存妸 SPRING 婧愮爜鎷挎潵錛屼慨鏀逛竴涓嬭繖涓柟妗堬紝鐒跺悗鍐嶆墦鍖呮垚 SPRING.jar 鍙戝竷錛岃繖浜涢兘鏄笉濂界殑鏂規硶錛屾槸涓嶅畨鍏ㄧ殑銆?/div>
蹇呴』鏍規嵁 QuartzJobBean 鏉ラ噸鍐欎竴涓嚜宸辯殑綾?銆?/div>




abin 2015-07-26 01:39 鍙戣〃璇勮
]]>quartz 鏁版嵁琛?/title><link>http://www.tkk7.com/stevenjohn/archive/2015/07/23/426393.html</link><dc:creator>abin</dc:creator><author>abin</author><pubDate>Thu, 23 Jul 2015 07:31:00 GMT</pubDate><guid>http://www.tkk7.com/stevenjohn/archive/2015/07/23/426393.html</guid><wfw:comment>http://www.tkk7.com/stevenjohn/comments/426393.html</wfw:comment><comments>http://www.tkk7.com/stevenjohn/archive/2015/07/23/426393.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/stevenjohn/comments/commentRss/426393.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/stevenjohn/services/trackbacks/426393.html</trackback:ping><description><![CDATA[<span style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_CALENDARS 浠?Blob 綾誨瀷瀛樺偍 Quartz 鐨?Calendar 淇?/span><span style="color: #464646; font-family: simsun; background-color: #dcdcdc;">鎭?nbsp;</span><wbr style="color: #464646; font-family: simsun; background-color: #dcdcdc;"><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_CRON_TRIGGERS 瀛樺偍 Cron Trigger錛屽寘鎷?Cron琛ㄨ揪寮忓拰鏃跺尯淇℃伅 <wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_FIRED_TRIGGERS 瀛樺偍涓庡凡瑙﹀彂鐨?Trigger 鐩稿叧鐨勭姸鎬佷俊鎭紝浠ュ強鐩歌仈 Job鐨勬墽琛屼俊鎭疩RTZ_PAUSED_TRIGGER_GRPS 瀛樺偍宸叉殏鍋滅殑 Trigger 緇勭殑淇℃伅 <wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_SCHEDULER_STATE 瀛樺偍灝戦噺鐨勬湁鍏?Scheduler 鐨勭姸鎬佷俊鎭紝鍜屽埆鐨?Scheduler瀹炰緥(鍋囧鏄敤浜庝竴涓泦緹や腑) <wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_LOCKS 瀛樺偍紼嬪簭鐨?span style="word-wrap: normal; word-break: normal;">鎮?/span>瑙傞攣鐨勪俊鎭?鍋囧浣跨敤浜嗘偛瑙傞攣) <wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_JOB_DETAILS 瀛樺偍姣忎竴涓凡閰嶇疆鐨?Job 鐨勮緇嗕俊鎭?nbsp;<wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_JOB_LISTENERS 瀛樺偍鏈夊叧宸查厤緗殑 JobListener 鐨勪俊鎭?nbsp;<wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_SIMPLE_TRIGGERS 瀛樺偍綆鍗曠殑Trigger錛屽寘鎷噸澶嶆鏁幫紝闂撮殧錛屼互鍙婂凡瑙︾殑嬈℃暟 <wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_BLOG_TRIGGERS Trigger 浣滀負 Blob 綾誨瀷瀛樺偍(鐢ㄤ簬 Quartz 鐢ㄦ埛鐢?JDBC鍒涘緩浠栦滑鑷繁瀹氬埗鐨?Trigger 綾誨瀷錛孞obStore 騫朵笉鐭ラ亾濡備綍瀛樺偍瀹炰緥鐨勬椂鍊? <wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_TRIGGER_LISTENERS 瀛樺偍宸查厤緗殑 TriggerListener 鐨勪俊鎭?nbsp;<wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">QRTZ_TRIGGERS 瀛樺偍宸查厤緗殑 Trigger 鐨勪俊鎭?nbsp;<wbr></div><div style="color: #464646; font-family: simsun; background-color: #dcdcdc;">--------------------------------------------------------------------------------------------------<div></div><div><span style="word-wrap: normal; word-break: normal; line-height: 26px; color: #555b6e; font-family: Arial; font-weight: bold; text-indent: 8px; background-color: #ffffff;">quartz 鎸佷箙鍖栨暟鎹簱琛ㄦ牸瀛楁瑙i噴</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">寤鴻〃,SQL璇彞鍦╭uartz-1.6.6\docs\dbTables鏂囦歡澶逛腑鍙互鎵懼埌,浠嬬粛涓嬩富瑕佺殑鍑犲紶琛細 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> 琛╭rtz_job_details: 淇濆瓨job璇︾粏淇℃伅,璇ヨ〃闇瑕佺敤鎴鋒牴鎹疄闄呮儏鍐靛垵濮嬪寲 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> job_name:闆嗙兢涓璲ob鐨勫悕瀛?璇ュ悕瀛楃敤鎴瘋嚜宸卞彲浠ラ殢鎰忓畾鍒?鏃犲己琛岃姹?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> job_group:闆嗙兢涓璲ob鐨勬墍灞炵粍鐨勫悕瀛?璇ュ悕瀛楃敤鎴瘋嚜宸遍殢鎰忓畾鍒?鏃犲己琛岃姹?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> job_class_name:闆嗙兢涓釜note job瀹炵幇綾葷殑瀹屽叏鍖呭悕,quartz灝辨槸鏍規嵁榪欎釜璺緞鍒癱lasspath鎵懼埌璇ob綾?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> is_durable:鏄惁鎸佷箙鍖?鎶婅灞炴ц緗負1錛宷uartz浼氭妸job鎸佷箙鍖栧埌鏁版嵁搴撲腑 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> job_data:涓涓猙lob瀛楁錛屽瓨鏀炬寔涔呭寲job瀵硅薄 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> 琛╭rtz_triggers: 淇濆瓨trigger淇℃伅 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> trigger_name: trigger鐨勫悕瀛?璇ュ悕瀛楃敤鎴瘋嚜宸卞彲浠ラ殢鎰忓畾鍒?鏃犲己琛岃姹?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> trigger_group:trigger鎵灞炵粍鐨勫悕瀛?璇ュ悕瀛楃敤鎴瘋嚜宸遍殢鎰忓畾鍒?鏃犲己琛岃姹?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> job_name: qrtz_job_details琛╦ob_name鐨勫閿?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> job_group: qrtz_job_details琛╦ob_group鐨勫閿?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> trigger_state:褰撳墠trigger鐘舵侊紝璁劇疆涓篈CQUIRED,濡傛灉璁劇疆涓篧AITING,鍒檍ob涓嶄細瑙﹀彂 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> trigger_cron:瑙﹀彂鍣ㄧ被鍨?浣跨敤cron琛ㄨ揪寮?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> 琛╭rtz_cron_triggers:瀛樺偍cron琛ㄨ揪寮忚〃 <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> trigger_name: qrtz_triggers琛╰rigger_name鐨勫閿?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> trigger_group: qrtz_triggers琛╰rigger_group鐨勫閿?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> cron_expression:cron琛ㄨ揪寮?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> 琛╭rtz_scheduler_state:瀛樺偍闆嗙兢涓璶ote瀹炰緥淇℃伅錛宷uartz浼氬畾鏃惰鍙栬琛ㄧ殑淇℃伅鍒ゆ柇闆嗙兢涓瘡涓疄渚嬬殑褰撳墠鐘舵?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> instance_name:涔嬪墠閰嶇疆鏂囦歡涓璷rg.quartz.scheduler.instanceId閰嶇疆鐨勫悕瀛楋紝灝變細鍐欏叆璇ュ瓧孌碉紝濡傛灉璁劇疆涓篈UTO,quartz浼氭牴鎹墿鐞嗘満鍚嶅拰褰撳墠鏃墮棿浜х敓涓涓悕瀛?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> last_checkin_time:涓婃媯鏌ユ椂闂?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> checkin_interval:媯鏌ラ棿闅旀椂闂?nbsp;<wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><strong style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">姝ラ4</strong><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">: <wbr></span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"> <wbr>閰嶇疆quartz.properties鏂囦歡錛?/span><br style="line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;" /><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#璋冨害鏍囪瘑鍚?闆嗙兢涓瘡涓涓疄渚嬮兘蹇呴』浣跨敤鐩稿悓鐨勫悕縐?nbsp;org.quartz.scheduler.instanceName = scheduler</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#ID璁劇疆涓鴻嚜鍔ㄨ幏鍙?姣忎竴涓繀欏諱笉鍚?nbsp;org.quartz.scheduler.instanceId = AUTO</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#鏁版嵁淇濆瓨鏂瑰紡涓烘寔涔呭寲 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#鏁版嵁搴撳鉤鍙?org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate #鏁版嵁搴撳埆鍚?闅忎究鍙杘rg.quartz.jobStore.dataSource = myXADS</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#琛ㄧ殑鍓嶇紑 org.quartz.jobStore.tablePrefix = QRTZ_</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#璁劇疆涓篢RUE涓嶄細鍑虹幇搴忓垪鍖栭潪瀛楃涓茬被鍒?BLOB 鏃朵駭鐢熺殑綾葷増鏈棶棰?org.quartz.jobStore.useProperties = true</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#鍔犲叆闆嗙兢 org.quartz.jobStore.isClustered = true</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#璋冨害瀹炰緥澶辨晥鐨勬鏌ユ椂闂撮棿闅?nbsp;org.quartz.jobStore.clusterCheckinInterval = 20000 <wbr></span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#瀹硅鐨勬渶澶т綔涓氬歡闀挎椂闂?nbsp;org.quartz.jobStore.misfireThreshold = 60000</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#ThreadPool 瀹炵幇鐨勭被鍚?org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#綰跨▼鏁伴噺 org.quartz.threadPool.threadCount = 10</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#綰跨▼浼樺厛綰?org.quartz.threadPool.threadPriority = 5</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#鑷垱寤虹埗綰跨▼ org.quartz.threadPool.threadsInheritContextCla<wbr>ssLoaderOfInitializingTh<wbr>read = true <wbr></span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#璁劇疆鏁版嵁婧恛rg.quartz.dataSource.myXADS.jndiURL = CT</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">#jbdi綾誨悕 org.quartz.dataSource.myXADS.java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory #URLorg.quartz.dataSource.myXADS.java.naming.provider.url = t3://localhost:7001</span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;"><br /></span></div><div><span style="word-wrap: normal; word-break: normal; line-height: normal; color: #2a2929; font-family: Arial; font-size: 12px; background-color: #ffffff;">銆愭敞銆戯細鍦↗2EE宸ョ▼涓鏋滄兂鐢ㄦ暟鎹簱綆$悊Quartz鐨勭浉鍏充俊鎭紝灝變竴瀹氳閰嶇疆鏁版嵁婧愶紝榪欐槸Quartz鐨勮姹傘?/span></div></div><img src ="http://www.tkk7.com/stevenjohn/aggbug/426393.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/stevenjohn/" target="_blank">abin</a> 2015-07-23 15:31 <a href="http://www.tkk7.com/stevenjohn/archive/2015/07/23/426393.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>綰唬鐮佸疄鐜癚uartz瀹氭椂鍣?浜?http://www.tkk7.com/stevenjohn/archive/2012/08/25/386255.htmlabinabinSat, 25 Aug 2012 04:43:00 GMThttp://www.tkk7.com/stevenjohn/archive/2012/08/25/386255.htmlhttp://www.tkk7.com/stevenjohn/comments/386255.htmlhttp://www.tkk7.com/stevenjohn/archive/2012/08/25/386255.html#Feedback0http://www.tkk7.com/stevenjohn/comments/commentRss/386255.htmlhttp://www.tkk7.com/stevenjohn/services/trackbacks/386255.htmlpackage com.abin.lee.quartz.all;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class UniversalQuartz implements Job{

 public void execute(JobExecutionContext arg0) throws JobExecutionException {
  System.out.println("鎵ц瀹氭椂浠誨姟: "+System.currentTimeMillis());
  
 }
 
}




package com.abin.lee.quartz.all;

import java.text.ParseException;
import java.util.Date;

import org.quartz.CronTrigger;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;

public class UniversalQuartzManager {
 private static UniversalQuartzManager instance = null;
 private Scheduler sched = null;
 private SchedulerFactory factory = null;

 private UniversalQuartzManager() {
  _init();
 }

 private void _init() {
  factory = new org.quartz.impl.StdSchedulerFactory();
  try {
   sched = factory.getScheduler();
  } catch (SchedulerException e) {
   e.printStackTrace();
  }
 }

 public synchronized static UniversalQuartzManager getInstance() {
  if (instance == null) {
   instance = new UniversalQuartzManager();
  }
  return instance;
 }

 public void start() {
  try {
   sched.start();
   // 鍦ㄨ繖閲屽姞杞介渶瑕佹墽琛岀殑涓氬姟閫昏緫綾籙niversalQuartz.class
   JobDetail detail = new JobDetail("cmhksynchron", "cmhkSynch",
     UniversalQuartz.class);
   CronTrigger trigger = new CronTrigger();
   // 鎵嬪姩娣誨姞浜嗘椂闂?br />   trigger.setCronExpression("0/10 * * * * ? *");
//   trigger.setCronExpression("0 0-59 16 * * ?");
   trigger.setName("abintrigger");
   trigger.setStartTime(new Date());
   sched.scheduleJob(detail, trigger);
  } catch (SchedulerException e) {
   e.printStackTrace();
  } catch (ParseException e2) {
   e2.printStackTrace();
  }
 }

 public void stop() {
  try {
   sched.shutdown();
   sched = factory.getScheduler();
  } catch (SchedulerException e) {
   e.printStackTrace();
  }
 }

 public void refresh() {
  // 鏈煡鐨勫師鍥狅紝紼嬪簭鎵ц榪欐鍒ゆ柇榪涘叆stop錛堬級錛屽湪sched.shutdown();榪欎竴鍙ユ姤閿欙紝//鎵浠ユ殏鏃跺皢鍏跺睆钄斤紝浠ュ緟鍚庢潵瑙e喅
  // try {
  // if(sched != null && sched.isStarted()) {
  // this.stop();
  // }
  this.start();
  // } catch (SchedulerException e) {
  // e.printStackTrace();
  // }
 }

}

 




package com.abinl.lee.quartz.all.test;

import com.abin.lee.quartz.all.UniversalQuartzManager;

public class TestQuartz {
 public static void main(String[] args) {
  UniversalQuartzManager.getInstance().refresh(); 
 }

}





abin 2012-08-25 12:43 鍙戣〃璇勮
]]>
綰唬鐮佸疄鐜癚uartz瀹氭椂鍣?涓)http://www.tkk7.com/stevenjohn/archive/2012/08/25/386253.htmlabinabinSat, 25 Aug 2012 03:48:00 GMThttp://www.tkk7.com/stevenjohn/archive/2012/08/25/386253.htmlhttp://www.tkk7.com/stevenjohn/comments/386253.htmlhttp://www.tkk7.com/stevenjohn/archive/2012/08/25/386253.html#Feedback1http://www.tkk7.com/stevenjohn/comments/commentRss/386253.htmlhttp://www.tkk7.com/stevenjohn/services/trackbacks/386253.html

娣卞叆瑙hQuartz鐨勫師鐞?br /> 
Quartz鏄竴涓ぇ鍚嶉紟榧庣殑Java鐗堝紑婧愬畾鏃惰皟搴﹀櫒錛屽姛鑳藉己鎮嶏紝浣跨敤鏂逛究銆?br /> 
涓銆佹牳蹇冩蹇?br /> 
Quartz鐨勫師鐞嗕笉鏄緢澶嶆潅錛屽彧瑕佹悶鏄庣櫧鍑犱釜姒傚康錛岀劧鍚庣煡閬撳浣曞幓鍚姩鍜屽叧闂竴涓皟搴︾▼搴忓嵆鍙?br /> 
1銆丣ob
琛ㄧず涓涓伐浣滐紝瑕佹墽琛岀殑鍏蜂綋鍐呭銆傛鎺ュ彛涓彧鏈変竴涓柟娉?br />void execute(JobExecutionContext context)
 
2銆丣obDetail
JobDetail琛ㄧず涓涓叿浣撶殑鍙墽琛岀殑璋冨害紼嬪簭錛孞ob鏄繖涓彲鎵ц紼嬭皟搴︾▼搴忔墍瑕佹墽琛岀殑鍐呭錛屽彟澶朖obDetail榪樺寘鍚簡榪欎釜浠誨姟璋冨害鐨勬柟妗堝拰絳栫暐銆?/p>

 
3銆乀rigger浠h〃涓涓皟搴﹀弬鏁扮殑閰嶇疆錛屼粈涔堟椂鍊欏幓璋冦?br /> 
4銆丼cheduler浠h〃涓涓皟搴﹀鍣紝涓涓皟搴﹀鍣ㄤ腑鍙互娉ㄥ唽澶氫釜JobDetail鍜孴rigger銆傚綋Trigger涓嶫obDetail緇勫悎錛屽氨鍙互琚玈cheduler瀹瑰櫒璋冨害浜嗐?br /> 
 
浜屻佷竴涓渶綆鍗曞叆闂ㄥ疄渚?br /> 
import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;

import java.util.Date;

/**
* quartz瀹氭椂鍣ㄦ祴璇?
*
* @author leizhimin 2009-7-23 8:49:01
*/
public class MyJob implements Job {
        public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
                System.out.println(new Date() + ": doing something...");
        }
}

class Test {
        public static void main(String[] args) {
                //1銆佸垱寤篔obDetial瀵硅薄
                JobDetail jobDetail = new JobDetail();
                //璁劇疆宸ヤ綔欏?
                jobDetail.setJobClass(MyJob.class);
                jobDetail.setName("MyJob_1");
                jobDetail.setGroup("JobGroup_1");

                //2銆佸垱寤篢rigger瀵硅薄
                SimpleTrigger strigger = new SimpleTrigger();
                strigger.setName("Trigger_1");
                strigger.setGroup("Trigger_Group_1");
                strigger.setStartTime(new Date());
                //璁劇疆閲嶅鍋滄鏃墮棿錛屽茍閿姣佽Trigger瀵硅薄
                java.util.Calendar c = java.util.Calendar.getInstance();
                c.setTimeInMillis(System.currentTimeMillis() + 1000 * 1L);
                strigger.setEndTime(c.getTime());
                strigger.setFireInstanceId("Trigger_1_id_001");
                //璁劇疆閲嶅闂撮殧鏃墮棿
                strigger.setRepeatInterval(1000 * 1L);
                //璁劇疆閲嶅鎵ц嬈℃暟
                strigger.setRepeatCount(3);

                //3銆佸垱寤篠cheduler瀵硅薄錛屽茍閰嶇疆JobDetail鍜孴rigger瀵硅薄
                SchedulerFactory sf = new StdSchedulerFactory();
                Scheduler scheduler = null;
                try {
                        scheduler = sf.getScheduler();
                        scheduler.scheduleJob(jobDetail, strigger);
                        //4銆佸茍鎵ц鍚姩銆佸叧闂瓑鎿嶄綔
                        scheduler.start();

                } catch (SchedulerException e) {
                        e.printStackTrace();
                }
//                try {
//                        //鍏抽棴璋冨害鍣?
//                        scheduler.shutdown(true);
//                } catch (SchedulerException e) {
//                        e.printStackTrace();
//                }
        }
}
 
鎵ц緇撴灉錛?/p>

 
褰撴妸緇撴潫鏃墮棿鏀逛負錛?br />                //璁劇疆閲嶅鍋滄鏃墮棿錛屽茍閿姣佽Trigger瀵硅薄
                java.util.Calendar c = java.util.Calendar.getInstance();
                c.setTimeInMillis(System.currentTimeMillis() + 1000 * 1L);
                strigger.setEndTime(c.getTime());
 
鎵ц緇撴灉錛?br /> 
褰撴坊鍔犱竴鏉″叧闂皟搴﹀櫒鐨勮鍙ワ細
                        //4銆佸茍鎵ц鍚姩銆佸叧闂瓑鎿嶄綔
                        scheduler.start();
                        scheduler.shutdown(true);

 
紼嬪簭鎵ц緇撴灉錛?br />Thu Jul 23 10:11:50 CST 2009: doing something...

Process finished with exit code 0
浠呬粎鎵ц浜嗕竴嬈★紝榪欎竴嬈¤兘鎵ц瀹岋紝鍘熷洜鏄瀹氫簡scheduler.shutdown(true);true琛ㄧず絳夊緟鏈浠誨姟鎵ц瀹屾垚鍚庡仠姝€?br /> 
浠庤繖閲屼篃鍙互鐪嬪嚭錛宻cheduler鏄釜瀹瑰櫒錛宻cheduler鎺у埗jobDetail鐨勬墽琛岋紝鎺у埗鐨勭瓥鐣ユ槸閫氳繃trigger銆?br /> 
褰搒cheduler瀹瑰櫒鍚姩鍚庯紝jobDetail鎵嶈兘鏍規嵁鍏寵仈鐨則rigger絳栫暐鍘繪墽琛屻傚綋scheduler瀹瑰櫒鍏抽棴鍚庯紝鎵鏈夌殑jobDetail閮藉仠姝㈡墽琛屻?br /> 
涓夈侀忚繃瀹炰緥鐪嬪師鐞?br /> 
閫氳繃鐮旇Quartz鐨勬簮浠g爜錛屽拰鏈疄渚嬶紝緇堜簬鎮熷嚭浜哘uartz鐨勫伐浣滃師鐞嗐?br /> 
1銆乻cheduler鏄竴涓鍒掕皟搴﹀櫒瀹瑰櫒錛堟婚儴錛夛紝瀹瑰櫒閲岄潰鍙互鐩涙斁浼楀鐨凧obDetail鍜宼rigger錛屽綋瀹瑰櫒鍚姩鍚庯紝閲岄潰鐨勬瘡涓狫obDetail閮戒細鏍規嵁trigger鎸夐儴灝辯彮鑷姩鍘繪墽琛屻?br /> 
2銆丣obDetail鏄竴涓彲鎵ц鐨勫伐浣滐紝瀹冩湰韜彲鑳芥槸鏈夌姸鎬佺殑銆?br /> 
3銆乀rigger浠h〃涓涓皟搴﹀弬鏁扮殑閰嶇疆錛屼粈涔堟椂鍊欏幓璋冦?br /> 
4銆佸綋JobDetail鍜孴rigger鍦╯cheduler瀹瑰櫒涓婃敞鍐屽悗錛屽艦鎴愪簡瑁呴厤濂界殑浣滀笟錛圝obDetail鍜孴rigger鎵緇勬垚鐨勪竴瀵瑰効錛夛紝灝卞彲浠ヤ即闅忓鍣ㄥ惎鍔ㄨ岃皟搴︽墽琛屼簡銆?br /> 
5銆乻cheduler鏄釜瀹瑰櫒錛屽鍣ㄤ腑鏈変竴涓嚎紼嬫睜錛岀敤鏉ュ茍琛岃皟搴︽墽琛屾瘡涓綔涓氾紝榪欐牱鍙互鎻愰珮瀹瑰櫒鏁堢巼銆?br /> 
6銆佸皢涓婅堪鐨勭粨鏋勭敤涓涓浘鏉ヨ〃紺猴紝濡備笅錛?br /> 

 
鍥涖佹葷粨
 
1銆佹悶娓呮浜嗕笂Quartz瀹瑰櫒鎵ц浣滀笟鐨勭殑鍘熺悊鍜岃繃紼嬶紝浠ュ強浣滀笟褰㈡垚鐨勬柟寮忥紝浣滀笟娉ㄥ唽鍒板鍣ㄧ殑鏂規硶銆傚氨璁よ瘑鏄庣櫧浜哘uartz鐨勬牳蹇冨師鐞嗐?br /> 
2銆丵uartz铏界劧寰堝簽澶э紝浣嗘槸涓鍒囬兘鍥寸粫榪欎釜鏍稿績杞紝涓轟簡閰嶇疆寮哄ぇ鏃墮棿璋冨害絳栫暐錛屽彲浠ョ爺絀朵笓闂ㄧ殑CronTrigger銆傝鎯崇伒媧婚厤緗綔涓氬拰瀹瑰櫒灞炴э紝鍙互閫氳繃Quartz鐨刾roperties鏂囦歡鎴栬匵ML鏉ュ疄鐜般?br /> 
3銆佽鎯寵皟搴︽洿澶氱殑鎸佷箙鍖栥佺粨鏋勫寲浣滀笟錛屽彲浠ラ氳繃鏁版嵁搴撹鍙栦綔涓氾紝鐒跺悗鏀懼埌瀹瑰櫒涓墽琛屻?br /> 
4銆佹墍鏈夌殑涓鍒囬兘鍥寸粫榪欎釜鏍稿績鍘熺悊杞紝鎼炴槑鐧借繖涓簡錛屽啀鍘葷爺絀舵洿楂樼駭鐢ㄦ硶灝卞鏄撳浜嗐?br /> 
5銆丵uartz涓嶴pring鐨勬暣鍚堜篃闈炲父綆鍗曪紝Spring鎻愪緵涓緇凚ean鏉ユ敮鎸侊細MethodInvokingJobDetailFactoryBean銆丼impleTriggerBean銆丼chedulerFactoryBean錛岀湅鐪嬮噷闈㈤渶瑕佹敞鍏ヤ粈涔堝睘鎬у嵆鍙槑鐧戒簡銆係pring浼氬湪Spring瀹瑰櫒鍚姩鏃跺欙紝鍚姩Quartz瀹瑰櫒銆?br /> 
6銆丵uartz瀹瑰櫒鐨勫叧闂柟寮忎篃寰堢畝鍗曪紝濡傛灉鏄疭pring鏁村悎錛屽垯鏈変袱縐嶆柟娉曪紝涓縐嶆槸鍏抽棴Spring瀹瑰櫒錛屼竴縐嶆槸鑾峰彇鍒癝chedulerFactoryBean瀹炰緥錛岀劧鍚庤皟鐢ㄤ竴涓猻hutdown灝辨悶瀹氫簡銆傚鏋滄槸Quartz鐙珛浣跨敤錛屽垯鐩存帴璋冪敤scheduler.shutdown(true);
 
7銆丵uartz鐨凧obDetail銆乀rigger閮藉彲浠ュ湪榪愯鏃墮噸鏂拌緗紝騫朵笖鍦ㄤ笅嬈¤皟鐢ㄦ椂鍊欒搗浣滅敤銆傝繖灝變負鍔ㄦ佷綔涓氱殑瀹炵幇鎻愪緵浜嗕緷鎹備綘鍙互灝嗚皟搴︽椂闂寸瓥鐣ュ瓨鏀懼埌鏁版嵁搴擄紝鐒跺悗閫氳繃鏁版嵁搴撴暟鎹潵璁懼畾Trigger錛岃繖鏍峰氨鑳戒駭鐢熷姩鎬佺殑璋冨害銆?br />


http://blog.csdn.net/jiangfeng861016/article/details/5970745






abin 2012-08-25 11:48 鍙戣〃璇勮
]]>Spring Quartz闆嗙兢http://www.tkk7.com/stevenjohn/archive/2012/08/17/385702.htmlabinabinFri, 17 Aug 2012 10:01:00 GMThttp://www.tkk7.com/stevenjohn/archive/2012/08/17/385702.htmlhttp://www.tkk7.com/stevenjohn/comments/385702.htmlhttp://www.tkk7.com/stevenjohn/archive/2012/08/17/385702.html#Feedback0http://www.tkk7.com/stevenjohn/comments/commentRss/385702.htmlhttp://www.tkk7.com/stevenjohn/services/trackbacks/385702.html

Spring+Quartz鐨勯泦緹ら厤緗?/h2> 
http://blog.sina.com.cn/s/blog_4b0210750100z6jb.html#SinaEditor_Temp_FontName

abin 2012-08-17 18:01 鍙戣〃璇勮
]]>Quartz瀹樼綉 http://www.tkk7.com/stevenjohn/archive/2012/08/17/385667.htmlabinabinFri, 17 Aug 2012 03:14:00 GMThttp://www.tkk7.com/stevenjohn/archive/2012/08/17/385667.htmlhttp://www.tkk7.com/stevenjohn/comments/385667.htmlhttp://www.tkk7.com/stevenjohn/archive/2012/08/17/385667.html#Feedback0http://www.tkk7.com/stevenjohn/comments/commentRss/385667.htmlhttp://www.tkk7.com/stevenjohn/services/trackbacks/385667.html瀹樼綉錛歨ttp://quartz-scheduler.org/

瀛︿範鏂囨。錛歨ttp://quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/

渚嬪瓙錛歨ttp://quartz-scheduler.org/documentation/quartz-2.1.x/examples/ 

spring闆嗘垚瀹樼綉錛?a >http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/scheduling.html#scheduling-quartz



http://blog.csdn.net/lan861698789/article/details/7620104

abin 2012-08-17 11:14 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 91天堂素人精品系列全集亚洲| 亚洲第一成年免费网站| 四虎免费永久在线播放| 亚洲精品乱码久久久久久下载| 今天免费中文字幕视频| 国产亚洲成归v人片在线观看| 国产精品亚洲精品日韩动图| 午夜免费福利网站| 日韩亚洲国产高清免费视频| 波多野结衣在线免费视频| 亚洲人成网站18禁止久久影院 | 日韩a级毛片免费视频| 亚洲精品亚洲人成在线播放| 免费毛片a在线观看67194| 亚洲1234区乱码| 在线不卡免费视频| 国产精品成人亚洲| 红杏亚洲影院一区二区三区| 三年片在线观看免费西瓜视频| 久久精品国产精品亚洲精品| 久久久精品国产亚洲成人满18免费网站| 国产亚洲精久久久久久无码AV| 男女一进一出抽搐免费视频| 亚洲AV综合色区无码一区| 午夜免费福利片观看| 亚洲区视频在线观看| 白白国产永久免费视频| 日韩在线观看免费| 久久青青草原亚洲AV无码麻豆 | 日韩黄色免费观看| 一级毛片在线播放免费| 亚洲国产成人片在线观看无码 | 亚洲欧洲另类春色校园小说| 91免费资源网站入口| 白白色免费在线视频| 亚洲欧洲国产精品香蕉网| 五月亭亭免费高清在线| 亚洲精品成a人在线观看夫| 久久亚洲高清综合| 亚洲高清免费在线观看| 菠萝菠萝蜜在线免费视频|