[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Simulate misfire?  XML
Forum Index -> Quartz
Author Message
tr314

neo

Joined: 09/12/2013 08:50:29
Messages: 2
Offline

I'm looking for a way to simulate or force a trigger misfire programatically. Here's the scenario:

I have a job set to trigger but the job requires some underlying resource that may be unavailable at times. If the resource is unavailable, I would like Quartz to re-fire the trigger later based on the misfire policy.

I've explored two options that are similar but not quite what I'm looking for:
1. Throwing a JobExecutionException with refireImmediately set to true: Works, but doesn't delay execution based on misfire policy; this would hammer the resource availability check.
2. Scheduling a second trigger at some fixed interval of time in the future: Also works, but doesn't take into account misfire policy. This means a job could wind up with a bunch of retries queued up stemming from different failed runs.

Any ideas or anything I'm missing? Thanks!

regalo

neo

Joined: 10/02/2013 02:50:49
Messages: 1
Offline

I'm testing the same situation with no success. Tried to use Scheduler.pauseAll()/resumeAll() - according to Javadocs "If any Trigger missed one or more fire-times, then the Trigger's misfire instruction will be applied.", but the misfire rule wasn't applied (it's MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT).
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team