[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 
Messages posted by: tr314  XML
Profile for tr314 -> Messages posted by tr314 [2]
Author Message
Using Java Quartz 2.2.1, I'm unable to find support for alternate (e.g. other than system default) time zones for DailyTimeIntervalTrigger. Does it exist, or does anyone know of a workaround?

For example, I'd like to do something like this:

 DailyTimeIntervalTrigger t = newTrigger()
 			.startingDailyAt(new TimeOfDay(8, 0))
 			// inTimeZone not present on DailyTimeIntervalScheduleBuilder
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!

Profile for tr314 -> Messages posted by tr314 [2]
Go to:   
Powered by JForum 2.1.7 © JForum Team