Say I want to add a note to a specific future firing of a CronTrigger in Quartz.
Is it possible to identify a specific future firing in such a way that I can give other objects a reference to it?
Say I want to add a note to a specific future firing of a CronTrigger in Quartz.
Is it possible to identify a specific future firing in such a way that I can give other objects a reference to it?
You can add "notes" to a trigger's JobDataMap
. When the trigger fires, those notes can guide that particular occurrence of the job to do something special.
What do you mean by "identify a specific future firing in such a way that I can give other objects a reference to it?" Are you trying to give the job a reference to some object that was available at when the trigger was added? If its not an object that can be persisted in the JobDataMap
, you can store its name instead, and use a name service (JNDI, a getBean
call into Spring, or whatever is appropriate for your environment) to get the object.