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.)
精彩评论