开发者

Quartz trigger start time before current time

开发者 https://www.devze.com 2022-12-16 07:01 出处:网络
Lets say that I have a quartz trigger SimpleTrigger that fires every second and start time is set to 12:00:00 today. It开发者_StackOverflow seems that when I schedule that trigger at 12:00:10 then it

Lets say that I have a quartz trigger SimpleTrigger that fires every second and start time is set to 12:00:00 today. It开发者_StackOverflow seems that when I schedule that trigger at 12:00:10 then it fires immediately 10 times. Is there a way to avoid that kind of behaviour or should I just manually set start time to 12:00:10 before scheduling?


Set the misfire instruction policy for your particular trigger type. This doc explains what are the available options for the SimpleTrigger http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-05

By default SimpleTrigger has MISFIRE_INSTRUCTION_SMART_POLICY policy active.


You may want to have a look at setMisfireInstruction() and choose the most suitable instruction supported by SimpleTrigger.

0

精彩评论

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