Hello All,
I have a requirement where in I need to update the value of a job after the first execution.
My scenario:
I have my job detail defined in jobs.xml file.
Code:
<job-detail>
<name>index</name>
<group>JOB_GROUP</group>
<description>This job will be read to create indexes using lucene</description>
<job-class>search.indexer.job.TestRun</job-class>
<job-data-map allows-transient-data="true">
<entry>
<key>re-execute</key>
<value>true</value>
</entry>
</job-data-map>
</job-detail>
The trigger is set in the xml in such a way that it executes the job class once every night at 1 am.
Problem:
Now I have to re-execute only once, i.e. after the first execution, the value for re-execute key should be updated to false in the job data map. I would like to know if there is a way to update the value in xml to false after the first execution using quartz. If not, probably I have to use conventional methods using xml transformer factory.
Any hint is highly appreciated.