File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Quartz Triggers re-firing before the last Job has completed execution... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Quartz Triggers re-firing before the last Job has completed execution..." Watch "Quartz Triggers re-firing before the last Job has completed execution..." New topic
Author

Quartz Triggers re-firing before the last Job has completed execution...

Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
I've configured a Quartz scheduler using Spring ContextLoaderListener. Everything is working fine, but I'm having a problem with Trigger "overlap".

When Trigger X fires, it kicks off Job X. IF Trigger X fires again, before Job X is complete, Job X will launch again, creating all sorts of race conditions, concurrency issues, Hibernate Sessions closing, dogs and cats living together in sin, etc.

How can I tell Trigger X to not launch the job, if the Job is already running?

I thought this was related to Trigger misfires, but apparantly that's something else entirely unrelated...

Help!
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
My guess is that you want to implement a TriggerListener, and provide an appropriate vetoJobExecution method to enforce the behaviour you want. See:

Quartz Tutorial Lesson 7

Guy
Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
This is pretty much exactly what I was looking for. Just thought the functionality might be built-in...

Thanks Guy!
 
Don't get me started about those stupid light bulbs.
 
subject: Quartz Triggers re-firing before the last Job has completed execution...
 
Similar Threads
org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
listener to the folder changes in java application.
Rescheduling jobs in Quartz with JobStoreTX
How to control jobs in a clustered environment?
Client API for Quartz