开发者

how implement method Scheduler.interrupt to stop a Job

开发者 https://www.devze.com 2023-01-18 15:07 出处:网络
i\'ve no idea how implement this method of the interface InterruptableJob i don\'t know if the best way to stop a job is with this method or using deleteJob is better, the problem is that with delet开

i've no idea how implement this method of the interface InterruptableJob i don't know if the best way to stop a job is with this method or using deleteJob is better, the problem is that with delet开发者_StackOverflow中文版eJob the job stops completely and i just need that only that execution stops.


Not an answer as I don't have the rep to comment yet, but what version of quartz? It's concept of pausing and stopping differ between versions...

OK, as per the comments below, a patch I remember coming into our project (Ikasan) in order to get around this was something along the lines of not using the scheduler.pauseJobGroup(jobGroup) but instead looping over each job and calling scheduler.pauseJob(JOB_NAME, jobGroup)

Likewise we then used resumeJob as opposed to resumeJobGroup

I'll try to dig up the exact code from our commit history - we bundle our own quartz when working with Jboss now. There have been a lot of fixes :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号