apache/dolphinscheduler · error · ServiceException
10023
10023
Error message
online status does not allow update operations
What it means
updateSchedule refuses to modify a schedule whose releaseState is ONLINE (SCHEDULE_CRON_ONLINE_FORBID_UPDATE). Online schedules are considered active/running, so mutation is disallowed until the schedule is taken offline.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:539
private void checkScheduleBelongsToProject(Schedule schedule, long projectCode) {
if (schedule == null) {
return;
}
WorkflowDefinition workflowDefinition =
workflowDefinitionDao.queryByCode(schedule.getWorkflowDefinitionCode()).orElse(null);
if (workflowDefinition == null || workflowDefinition.getProjectCode() != projectCode) {
throw new ServiceException(Status.SCHEDULE_NOT_EXISTS, schedule.getId());
}
}
private Schedule updateSchedule(Schedule schedule, WorkflowDefinition workflowDefinition,
String scheduleExpression, WarningType warningType, int warningGroupId,
FailureStrategy failureStrategy, Priority workflowInstancePriority,
String workerGroup, String tenantCode, long environmentCode) {
if (schedule.getReleaseState() == ReleaseState.ONLINE) {
log.warn("Schedule can not be updated due to schedule is {}, scheduleId:{}.",
ReleaseState.ONLINE.getDescp(), schedule.getId());
throw new ServiceException(Status.SCHEDULE_CRON_ONLINE_FORBID_UPDATE);
}
Date now = new Date();
tenantExistValidator.validate(tenantCode);
schedule.setTenantCode(tenantCode);
// updateWorkflowInstance param
if (!StringUtils.isEmpty(scheduleExpression)) {
ScheduleParam scheduleParam = JSONUtils.parseObject(scheduleExpression, ScheduleParam.class);
if (scheduleParam == null) {
log.warn("Parameter scheduleExpression is invalid, so parse cron error.");
throw new ServiceException(Status.PARSE_TO_CRON_EXPRESSION_ERROR);
}
if (DateUtils.differSec(scheduleParam.getStartTime(), scheduleParam.getEndTime()) == 0) {
log.warn("The start time must not be the same as the end or time can not be null.");
throw new ServiceException(Status.SCHEDULE_START_TIME_END_TIME_SAME);
}View on GitHub (pinned to 02eac45a1b)
Solutions
- Take the schedule offline first (offlineScheduler / release API), then update, then bring it back online.
- Check schedule.getReleaseState() before attempting an update and skip or offline accordingly.
- Coordinate with teammates — the schedule may have been onlined by someone else.
- In automation, wrap: offline -> update -> online.
Example fix
// before scheduleService.updateSchedule(loginUser, projectCode, id, ...); // fails when online // after scheduleService.offlineScheduler(loginUser, projectCode, id); scheduleService.updateSchedule(loginUser, projectCode, id, ...); scheduleService.onlineScheduler(loginUser, projectCode, id);
Defensive patterns
Strategy: validation
Validate before calling
Schedule schedule = scheduleDao.queryByWorkflowDefinitionCode(code);
if (schedule != null && schedule.getReleaseState() == ReleaseState.ONLINE) {
throw new IllegalStateException("Offline schedule " + schedule.getId() + " before updating");
} Try / catch
try {
schedulerService.updateSchedule(loginUser, projectCode, id, ...);
} catch (ServiceException e) {
if (e.getCode() == Status.SCHEDULE_CRON_ONLINE_FORBID_UPDATE.getCode()) {
schedulerService.offlineScheduler(loginUser, projectCode, id);
schedulerService.updateSchedule(loginUser, projectCode, id, ...);
schedulerService.onlineScheduler(loginUser, projectCode, id);
}
} Prevention
- Adopt offline -> update -> online as the standard update flow
- Check ReleaseState before mutating schedules
- Serialize schedule mutations to avoid concurrent online/offline races
- Refresh schedule state from the server before editing in UIs
When it happens
Trigger: Any updateSchedule call (direct or via updateScheduleByWorkflowDefinitionCode / REST PUT scheduler) on a schedule currently in ReleaseState.ONLINE.
Common situations: Editing a live schedule through the UI without first clicking 'offline'; CI scripts updating schedules while they run; concurrent operations where another user onlined the schedule between fetch and update.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- SCHEDULE_STATE_ONLINE
- 50004
- The workflowDefinition should be online
- SCHEDULE_CRON_ONLINE_FORBID_UPDATE
- WORKFLOW_DEFINITION_NOT_RELEASE
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/9a1387e32613dca2.
Report an issue: GitHub.