How to move job execution to a different instance based on custom criteria? #1278
Unanswered
devurandom
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I read #344 and am interested in a similar feature, or in a hint how to implement something like this with existing capabilities.
Context: Certain Quartz instances support certain jobs (they might implement the job class, but not a certain feature of it, or be currently not able to execute it).
What I am looking for: A way to prevent an instance from acquiring a job based on the result of a callback function 1, or alternatively a way for instances to reject execution of jobs based on a callback 2, so that another instance can try to acquire the job. These callbacks need to be executed on the instance where the job would be executed.
How would I do that within the features Quartz offers currently?
I believe this is different from
org.quartz.TriggerListener#vetoJobExecution
, since if that returnstrue
the job will not be executed at all, while I want it to be executed by a different instance.Footnotes
This callback would probably be called at around the time when
org.quartz.core.QuartzSchedulerThread#run
callsorg.quartz.spi.JobStore#acquireNextTriggers
? ↩This callback would probably be called before
org.quartz.core.QuartzSchedulerThread#run
creates theorg.quartz.core.JobRunShell
? ↩Beta Was this translation helpful? Give feedback.
All reactions