[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
issue when using quartz withMisfireHandlingInstructionIgnoreMisfires  XML
Forum Index -> Quartz
Author Message
ashwinss

neo

Joined: 07/10/2012 23:36:31
Messages: 2
Offline

I have a job that runs 1st minute of every hour.

Job will get current hour and query DB to see any notifications to be sent for this hour, if any, it will send email notifications.

Now the problem is with handling misfires.

say when the scheduler is down between say 8:30AM - 10:30AM, i missed 2 triggers. When the scheduler comes up at 10:30 i need these 2 missed triggers to get fired.so i am using quartz withMisfireHandlingInstructionIgnoreMisfires trigger.

Since my job has logic which queries based on current hour of the day, both misfire triggers will query notifications to send for 10AM only (not 8AM and 9AM)

How will i handle this scenario?

Does quartz has anyway to check misfire count inside job ?

Appreciate your help !!
adahanne

master

Joined: 03/20/2012 23:14:46
Messages: 78
Offline

hello,
did you try to use the context of your job ? for example something like context.getPreviousFireTime()
that way you could check if you're recovering or not, and take the appropriate actions ?
ashwinss

neo

Joined: 07/10/2012 23:36:31
Messages: 2
Offline

hi ,

i did not try using job context . Using job context should help . I will try this

thanks for your response

--
ashwin
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team