{"record":{"id":"531cfd0e07b6f274","repo":"quarkusio/quarkus","slug":"unable-to-start-scheduler","errorCode":null,"errorMessage":"Unable to start Scheduler","messagePattern":"Unable to start Scheduler","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java","lineNumber":527,"sourceCode":"                    } catch (SchedulerException e) {\n                        throw new IllegalStateException(\"Unable to unschedule job with identity: \" + identity);\n                    }\n                    return trigger;\n                }\n            }\n        }\n        return null;\n    }\n\n    // Use Interceptor.Priority.PLATFORM_BEFORE to start the scheduler before regular StartupEvent observers\n    void start(@Observes @Priority(Interceptor.Priority.PLATFORM_BEFORE) StartupEvent startupEvent) {\n        if (scheduler == null || startHalted) {\n            return;\n        }\n        try {\n            scheduler.start();\n        } catch (SchedulerException e) {\n            throw new IllegalStateException(\"Unable to start Scheduler\", e);\n        }\n    }\n\n    /**\n     * Need to gracefully shut down the scheduler making sure that all triggers have been\n     * released before datasource shutdown.\n     *\n     * @param event ignored\n     */\n    void destroy(@Observes(notifyObserver = Reception.IF_EXISTS) @BeforeDestroyed(ApplicationScoped.class) Object event) {\n        if (scheduler != null) {\n            try {\n                if (shutdownWaitTime.isZero()) {\n                    scheduler.shutdown(false);\n                } else {\n                    CompletableFuture.supplyAsync(new Supplier<>() {\n                        @Override\n                        public Void get() {","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java#L509-L545","documentation":"Quarkus throws this IllegalStateException when the Quartz scheduler fails to start on application startup. The start(@Observes StartupEvent) observer calls scheduler.start(); any SchedulerException raised by Quartz (JobStore init failure, cluster check failure) is wrapped in this unchecked exception, which aborts application startup.","triggerScenarios":"Application startup with a Quartz scheduler configured but its JobStore failing to initialize — JDBC store DB unreachable, cluster lock acquisition failing, misconfigured quartz properties (instanceId, misfire threshold).","commonSituations":"quarkus.quartz.store-type=jdbc with a datasource that is down or missing Quartz tables; clustered mode with mismatched instance names or clock skew; wrong driver/credentials in the datasource config.","solutions":["Read the cause SchedulerException in the startup stack trace","Validate the datasource (URL, credentials, network) if using the jdbc store","Ensure Quartz tables exist (run the Quartz DDL scripts for your DB)","For clustered mode, verify quarkus.quartz.cluster-checkin-interval and that node names/config match across nodes"],"exampleFix":"// before (application.properties)\n# quarkus.quartz.store-type=jdbc  (DB missing tables)\n// after\nquarkus.quartz.store-type=db\n# or create tables:\n# CREATE TABLE QRTZ_JOB_DETAILS (...);  -- from Quartz DDL","handlingStrategy":"try-catch","validationCode":"// pre-startup: validate datasource for jdbc store\n@Observes StartupEvent e -> { /* ensure DB reachable before quartz starts */ }","typeGuard":null,"tryCatchPattern":"// This aborts startup by design; fix config rather than catch.\n// In tests, catch assertion:\ntry {\n    app.start();\n} catch (IllegalStateException e) {\n    assertThat(e).hasMessageContaining(\"Unable to start Scheduler\");\n}","preventionTips":["Validate the quartz datasource in CI before deployment","Create Quartz tables (DDL) when using the jdbc store","Keep cluster config identical across nodes (scheduler name, instance id strategy)","Start with store-type=memory in dev to isolate store vs scheduler issues"],"tags":["quartz","scheduler","startup","jobstore"],"backgroundTag":"scheduler-startup-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}