I wonder how to pass an instance variable externally in Quartz?
Below is pseudo code I would like to write. How can I pass externalInstance into this Job?
While scheduling the job using a trigger, you would have defined JobDataMap
that is added to the JobDetail
. That JobDetail object will be present in the JobExecutionContext
passed to the execute()
method in your Job
. So, you should figure out a way to pass your externalInstance through the JobDataMap
. HTH.