apache/dolphinscheduler · error · ServiceException

10203

10203

Error message

schedule {0} does not exist

What it means

checkScheduleBelongsToProject validates that the given schedule's owning workflow definition exists and that its projectCode equals the project being operated on. When the workflow definition is missing or belongs to a different project, SCHEDULE_NOT_EXISTS is thrown with the schedule id — the schedule is effectively not addressable within that project.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:528

            return;
        }
        schedule.setUpdateTime(new Date());
        schedule.setReleaseState(ReleaseState.OFFLINE);
        scheduleDao.updateById(schedule);
        WorkflowDefinition workflowDefinition =
                workflowDefinitionDao.queryByCode(schedule.getWorkflowDefinitionCode()).orElse(null);
        Project project = projectDao.queryByCode(workflowDefinition.getProjectCode());
        schedulerApi.deleteScheduleTask(project.getId(), schedule.getId());
    }

    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);

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Confirm the scheduleId belongs to the project you are calling with; list schedules via the project's schedule API.
  2. Pass the correct projectCode for the project that owns the schedule's workflow.
  3. Re-create the workflow definition and schedule if the definition was deleted (orphaned schedule).
  4. Check tenant scoping — ensure the login user has access to the owning project.
Defensive patterns

Strategy: validation

Validate before calling

Schedule schedule = scheduleMapper.selectById(scheduleId);
WorkflowDefinition wd = workflowDefinitionDao.queryByCode(schedule.getWorkflowDefinitionCode()).orElse(null);
if (wd == null || wd.getProjectCode() != projectCode) {
    throw new IllegalStateException("Schedule " + scheduleId + " not in project " + projectCode);
}

Try / catch

try {
    schedulerService.onlineScheduler(loginUser, projectCode, scheduleId);
} catch (ServiceException e) {
    if (e.getCode() == Status.SCHEDULE_NOT_EXISTS.getCode()) {
        // re-list schedules for the project to find the correct id
    }
}

Prevention

When it happens

Trigger: Calling onlineScheduler or offlineScheduler with a scheduleId whose workflow definition does not exist, or whose projectCode differs from the projectCode parameter.

Common situations: Using a scheduleId copied from another project/environment; schedule left orphaned after its workflow definition was deleted; mixed-up project codes in scripts or UI state.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/a976b30b9963f6dd. Report an issue: GitHub.