apache/dolphinscheduler · error · SchedulerException
QUARTZ_DELETE_JOB_ERROR
QUARTZ_DELETE_JOB_ERROR
Error message
QUARTZ_DELETE_JOB_ERROR
What it means
Quartz deleteJob(jobKey) or checkExists(jobKey) threw while removing the job identified by projectId+scheduleId. The guard only deletes when the key exists, so the failure is infrastructure-level (store/DB access, cluster lock) rather than a missing job; a failed delete leaves an orphaned Quartz trigger that can still fire.
Source
Thrown at dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.java:81
scheduler.scheduleJob(jobDetail, Sets.newHashSet(cornTrigger), true);
log.info("Success scheduleJob: {} with trigger: {} at quartz", jobDetail, cornTrigger);
} catch (Exception e) {
log.error("Failed to add scheduler task, projectId: {}, scheduler: {}", projectId, schedule, e);
throw new SchedulerException(QuartzSchedulerExceptionEnum.QUARTZ_UPSERT_JOB_ERROR, e);
}
}
@Override
public void deleteScheduleTask(int projectId, int scheduleId) throws SchedulerException {
JobKey jobKey = QuartzJobKey.of(projectId, scheduleId).toJobKey();
try {
if (scheduler.checkExists(jobKey)) {
log.info("Try to delete scheduler task, projectId: {}, schedulerId: {}", projectId, scheduleId);
scheduler.deleteJob(jobKey);
}
} catch (Exception e) {
log.error("Failed to delete scheduler task, projectId: {}, schedulerId: {}", projectId, scheduleId, e);
throw new SchedulerException(QuartzSchedulerExceptionEnum.QUARTZ_DELETE_JOB_ERROR, e);
}
}
@Override
public void close() {
// nothing to do
try {
scheduler.shutdown();
} catch (Exception e) {
throw new SchedulerException(QuartzSchedulerExceptionEnum.QUARTZ_SCHEDULER_SHOWDOWN_ERROR, e);
}
}
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Check Quartz JDBC store connectivity and QRTZ_LOCKS contention from other masters
- Retry the delete after the transient store error clears
- If the job key is inconsistent, inspect QRTZ_JOB_DETAILS/QRTZ_TRIGGERS for entries keyed 'project_{projectId}_schedule_{scheduleId}' and remove them manually
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/QuartzScheduler.java:81 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/b40a44c0b6d26163.
Report an issue: GitHub.