1
votes

Is there any way by which we can resume triggers in Quartz once system is back online?

We have some scheduled trigger(with frequency interval 6 hours), Sometime our system went down and it skips the execution of those triggers.

Can anyone suggest if its possible using Quartz scheduler to resume trigger those missed during downtime.

1
Have you tried using persistent job stores? which job store are you using? - Aman J
We are using org.quartz.impl.jdbcjobstore.JobStoreTX. - ABandooni

1 Answers

2
votes

You should include "MISFIRE_INSTRUCTION" with your trigger, while defining it. The below example shows MISFIRE_INSTRUCTION_FIRE_NOW

Trigger trigger = newTrigger().
    startAt(DateUtils.addSeconds(new Date(), -10)).
    withSchedule(
        simpleSchedule().
            withMisfireHandlingInstructionFireNow()  //MISFIRE_INSTRUCTION_FIRE_NOW
        ).
    build();

For a detailed explanation : see this