开发者

How to avoid firing same job by multiple threads in Quartz Schedular?

I have configured my job for every one minute. But some times same job get triggered by mutiple threads in milli seconds difference. I am using quar开发者_JAVA技巧tz1.6.

Can anyone help on this?? Also what is the usage of threadPool option in quartz.property file.


If you are using Java Spring, you need to set the concurrent property of the Job Detail bean to be false.


Have you tried:

org.quartz.jobStore.isClustered: true

Alternatively, you make your job into a Stateful job (and set isClustered to true), and that shoujld solve your problem. (Oops, StatefulJob is deprecated; use DisallowConcurrentExecution.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜