diff --git a/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java b/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java index e0207272ec9a1..e8a44f7a16ddc 100644 --- a/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java +++ b/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java @@ -807,6 +807,8 @@ public boolean isBlocking() { Optional> triggerBuilder = createTrigger(identity, scheduled, cronType, runtimeConfig, jobDetail); if (triggerBuilder.isPresent()) { + invoker = SimpleScheduler.initInvoker(invoker, skippedExecutionEvent, successExecutionEvent, + failedExecutionEvent, concurrentExecution, skipPredicate); org.quartz.Trigger trigger = triggerBuilder.get().build(); QuartzTrigger existing = scheduledTasks.putIfAbsent(identity, new QuartzTrigger(trigger.getKey(), new Function<>() { @@ -826,8 +828,6 @@ public org.quartz.Trigger apply(TriggerKey triggerKey) { throw new IllegalStateException("A job with this identity is already scheduled: " + identity); } - invoker = SimpleScheduler.initInvoker(invoker, skippedExecutionEvent, successExecutionEvent, - failedExecutionEvent, concurrentExecution, skipPredicate); try { scheduler.scheduleJob(jobDetail, trigger); } catch (SchedulerException e) {