quarkusio/quarkus · warning · IllegalStateException
Could not evaluate standby mode
Error message
Could not evaluate standby mode
What it means
Quarkus throws this IllegalStateException when querying the underlying Quartz scheduler's standby state fails. Scheduler.isRunning() returns !scheduler.isInStandbyMode(); Quartz raises SchedulerException if the scheduler is shut down or its JobStore cannot be consulted, and Quarkus converts it into this unchecked exception.
Source
Thrown at extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java:459
QuartzTrigger trigger = scheduledTasks.get(parsedIdentity);
if (trigger != null) {
scheduler.resumeJob(new JobKey(SchedulerUtils.lookUpPropertyValue(parsedIdentity), Scheduler.class.getName()));
events.fireScheduledJobResumed(new ScheduledJobResumed(trigger));
}
} catch (SchedulerException e) {
throw new RuntimeException("Unable to resume job", e);
}
}
@Override
public boolean isRunning() {
if (!isStarted()) {
return false;
} else {
try {
return !scheduler.isInStandbyMode();
} catch (SchedulerException e) {
throw new IllegalStateException("Could not evaluate standby mode", e);
}
}
}
@Override
public List<Trigger> getScheduledJobs() {
if (!isStarted()) {
throw notStarted();
}
return List.copyOf(scheduledTasks.values());
}
@Override
public Trigger getScheduledJob(String identity) {
if (!isStarted()) {
throw notStarted();
}
Objects.requireNonNull(identity);View on GitHub (pinned to e1c734241f)
Solutions
- Guard with isStarted() and check shutdown state before calling isRunning()
- Avoid calling isRunning() during application shutdown callbacks
- Check the cause SchedulerException for a store-level failure and fix datasource connectivity
- Use isStarted() (scheduler exists) rather than isRunning() when you only need lifecycle existence
Example fix
// before
boolean running = scheduler.isRunning();
// after
boolean running = scheduler.isStarted() && !isShuttingDown() ? safeIsRunning(scheduler) : false;
boolean safeIsRunning(Scheduler s) {
try { return s.isRunning(); }
catch (IllegalStateException e) { return false; }
} Defensive patterns
Strategy: type-guard
Validate before calling
boolean safe = scheduler.isStarted(); // check scheduler state before calling isRunning()
Type guard
boolean isRunningSafe(io.quarkus.scheduler.Scheduler s) {
if (s == null || !s.isStarted()) return false;
try { return s.isRunning(); }
catch (IllegalStateException e) { return false; }
} Try / catch
try {
boolean running = scheduler.isRunning();
} catch (IllegalStateException e) {
boolean running = false; // treat as not-running during shutdown
} Prevention
- Avoid calling isRunning() inside shutdown hooks / @PreDestroy logic
- Use isStarted() when you only need to know if a scheduler exists
- Cache the running state instead of polling during shutdown
When it happens
Trigger: Calling Scheduler.isRunning() after the Quartz scheduler has been shut down (or is shutting down) or when the underlying store cannot answer isInStandbyMode() — e.g. during shutdown races or JDBC store failures.
Common situations: Calling isRunning() from a shutdown hook or Scheduled job executing during app shutdown; health checks racing the destroy() lifecycle; DB-backed store failing mid-query.
Related errors
- Quartz scheduler is either explicitly disabled through quark
- Unable to pause scheduler
- Unable to pause job
- Unable to resume scheduler
- Unable to resume job
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/c165e916aad01051.
Report an issue: GitHub.