I am using XML Scheduling Plugin (XMLSchedulingDataProcessorPlugin
) to create several jobs and triggers on startup in JDBC job store in quartz-scheduler. This works fine but I have a problem with simple triggers configured to run only once.
When such a trigger fires, it is removed from the database as there is no next fire time. So far so good. Unfortunately when I restart the application the plugin can't find that trigger so it is reinserted again. Because I use MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
this job is fired again and again removed from the database. Restarting the application repeats the whole process.
Obviously I want my trigger to fire only once. Is it possible to keep fired triggers in the database even if they don't have next fire time? Or maybe this can be solved in a different way? Excerpt from my quartz_data.xml
file:
<processing-directives>
<overwrite-existing-data>false</overwrite-existing-data>
<ignore-duplicates>true</ignore-duplicates>
</processing-directives>
<schedule>
<trigger>
<simple>
<!-- ... -->
<start-time>2012-05-10T07:00:00Z</start-time>
<repeat-count>0</repeat-count>
<repeat-interval>0</repeat-interval>
</simple>
</trigger>
Note that there is a problem with all triggers that reached the last execution and hence were deleted from db.