Reputation: 9639
I have several routes that looks like :
from("quartz://" + getJobId() + "?cron=" + cronExpression + "&stateful=true")
.routeId(getJobId())
.autoStartup(false)
.to(getRouteTo());
Those routes can be started and stopped from an administration console. The problem I have is the following:
If a route is configured to run everyday at 17:00, currently if my route is started after 17:00, quartz notice that it should have run at 17:00 and will try to recover that missed execution.
I don't want that to happen, what I want:
Is it related to the fact that I chose a statefull job ? I chose a stateful job to avoid concurrent execution of the same job.
Upvotes: 3
Views: 1454
Reputation: 489
Based on Claus's suggestion, perhaps the following would work as a parameter on the quartz job (assuming you're using a org.quartz.SimpleTrigger):
trigger.misfireInstruction=org.quartz.SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
EDIT: Based on soilworker's comment, the above should be:
trigger.misfireInstruction=2
Upvotes: 1