{"record":{"id":"b01ecbf4a9ab99d5","repo":"quarkusio/quarkus","slug":"unable-to-pause-job","errorCode":null,"errorMessage":"Unable to pause job","messagePattern":"Unable to pause job","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java","lineNumber":378,"sourceCode":"    @Override\n    public void pause(String identity) {\n        if (!isStarted()) {\n            throw notStarted();\n        }\n        Objects.requireNonNull(identity, \"Cannot pause - identity is null\");\n        if (identity.isEmpty()) {\n            LOGGER.warn(\"Cannot pause - identity is empty\");\n            return;\n        }\n        try {\n            String parsedIdentity = SchedulerUtils.lookUpPropertyValue(identity);\n            QuartzTrigger trigger = scheduledTasks.get(parsedIdentity);\n            if (trigger != null) {\n                scheduler.pauseJob(new JobKey(parsedIdentity, Scheduler.class.getName()));\n                events.fireScheduledJobPaused(new ScheduledJobPaused(trigger));\n            }\n        } catch (SchedulerException e) {\n            throw new RuntimeException(\"Unable to pause job\", e);\n        }\n    }\n\n    @Override\n    public boolean isPaused(String identity) {\n        if (!isStarted()) {\n            throw notStarted();\n        }\n        Objects.requireNonNull(identity);\n        if (identity.isEmpty()) {\n            return false;\n        }\n        try {\n            List<? extends org.quartz.Trigger> triggers = scheduler\n                    .getTriggersOfJob(new JobKey(SchedulerUtils.lookUpPropertyValue(identity), Scheduler.class.getName()));\n            if (triggers.isEmpty()) {\n                return false;\n            }","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java#L360-L396","documentation":"Quarkus wraps a Quartz SchedulerException thrown while pausing a single scheduled job via Scheduler.pause(identity) into this RuntimeException. The pause is performed with scheduler.pauseJob(new JobKey(identity, ...)) against the underlying Quartz scheduler; a JobStore failure surfaces here with the SchedulerException as cause.","triggerScenarios":"Calling Scheduler.pause(identity) where the identity resolves (via SchedulerUtils.lookUpPropertyValue and scheduledTasks lookup) to a known job, but the Quartz JobStore fails while executing pauseJob — e.g. JDBC store DB error or clustered store lock failure.","commonSituations":"JDBC job store with database outage; identity containing a property placeholder (myjob.identity) whose resolution yields a job stored under a different key in a shared store; clustered mode row locks unavailable.","solutions":["Inspect the cause SchedulerException for the actual JobStore error","Verify datasource / database availability when store-type=jdbc","Confirm the job identity matches a registered @Scheduled identity (check config property expansion)","Retry the pause once the store is healthy"],"exampleFix":"// before\nscheduler.pause(\"myJob\");\n// after\ntry {\n    scheduler.pause(\"myJob\");\n} catch (RuntimeException e) {\n    LOGGER.errorf(e.getCause(), \"pause failed for job\");\n}","handlingStrategy":"try-catch","validationCode":"Trigger t = scheduler.getScheduledJob(identity);\nif (t == null) { LOGGER.warnf(\"Job %s not registered; pause skipped\", identity); }","typeGuard":null,"tryCatchPattern":"try {\n    scheduler.pause(identity);\n} catch (RuntimeException e) {\n    LOGGER.errorf(e.getCause(), \"Cannot pause job %s\", identity);\n}","preventionTips":["Verify the identity exists with getScheduledJob() before pausing","Check datasource health when using the jdbc store","Avoid raw identities with property placeholders unless the config property exists"],"tags":["quartz","scheduler","pause-job","jobstore"],"backgroundTag":"scheduler-job-pause-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"}