Reputation: 21
I am currently working on Quartz Scheduler (version 1.4.2). I am trying to code scheduler in such a way so that I can set Repeat Interval duration after starting the scheduler. I tried many ways to do it but its not working. Can anyone tell me how can we adjust the Repeat Interval Duration during runtime.
Thanks in advance.
Upvotes: 1
Views: 760
Reputation: 396
You'll need to unschedule the current job first, then reschedule it with the new interval value. Put a form in your GUI to use to set the new interval value at runtime, you can process the rescheduling when the value gets updated.
See this answer for an example using CronTrigger. The details will vary slightly for an Interval job, but it should be enough to get you going.
Upvotes: 1