quarkusio/quarkus · error · RuntimeException
Unable to pause job
Error message
Unable to pause job
What it means
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.
Source
Thrown at extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java:378
@Override
public void pause(String identity) {
if (!isStarted()) {
throw notStarted();
}
Objects.requireNonNull(identity, "Cannot pause - identity is null");
if (identity.isEmpty()) {
LOGGER.warn("Cannot pause - identity is empty");
return;
}
try {
String parsedIdentity = SchedulerUtils.lookUpPropertyValue(identity);
QuartzTrigger trigger = scheduledTasks.get(parsedIdentity);
if (trigger != null) {
scheduler.pauseJob(new JobKey(parsedIdentity, Scheduler.class.getName()));
events.fireScheduledJobPaused(new ScheduledJobPaused(trigger));
}
} catch (SchedulerException e) {
throw new RuntimeException("Unable to pause job", e);
}
}
@Override
public boolean isPaused(String identity) {
if (!isStarted()) {
throw notStarted();
}
Objects.requireNonNull(identity);
if (identity.isEmpty()) {
return false;
}
try {
List<? extends org.quartz.Trigger> triggers = scheduler
.getTriggersOfJob(new JobKey(SchedulerUtils.lookUpPropertyValue(identity), Scheduler.class.getName()));
if (triggers.isEmpty()) {
return false;
}View on GitHub (pinned to e1c734241f)
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
Example fix
// before
scheduler.pause("myJob");
// after
try {
scheduler.pause("myJob");
} catch (RuntimeException e) {
LOGGER.errorf(e.getCause(), "pause failed for job");
} Defensive patterns
Strategy: try-catch
Validate before calling
Trigger t = scheduler.getScheduledJob(identity);
if (t == null) { LOGGER.warnf("Job %s not registered; pause skipped", identity); } Try / catch
try {
scheduler.pause(identity);
} catch (RuntimeException e) {
LOGGER.errorf(e.getCause(), "Cannot pause job %s", identity);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable to pause scheduler
- Unable to resume scheduler
- Unable to resume job
- Unable to unschedule job with identity: ${identity}
- Unable to start Scheduler
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/b01ecbf4a9ab99d5.
Report an issue: GitHub.