当前位置:编程学习 > JAVA >>

求助 quartz启动与暂停问题

--------------------编程问答-------------------- resumeJobGroup的API解释说了(错过的触发,将在恢复时重新执行):
If any of the Job'sTrigger s missed one or more fire-times, then the Trigger's misfire instruction will be applied.

所以我想你应该用standby()会更合适(但这个影响是全局性的):
When start() is called (to bring the scheduler out of stand-by mode), trigger misfire instructions will NOT be applied during the execution of the start() method - any misfires will be detected immediately afterward (by the JobStore's normal process).

或者用unscheduleJob()将这个任务撤掉。


顺带说一句:在你这个例子里面,pauseJobGroup() 跟 pauseTriggerGroup() 重复,因为pauseJobGroup实际上也是暂停它的triggers:
Pause all of the JobDetails in the given group - by pausing all of their Triggers.
补充:Java ,  Java相关
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,