apache/dolphinscheduler · error · ServiceException
80003
80003
Error message
start time bigger than end time error
What it means
updateSchedule enforces startTime.getTime() <= endTime.getTime(); when start is strictly after end, START_TIME_BIGGER_THAN_END_TIME_ERROR is thrown. This is a stricter sibling of the equal-times check and guards the schedule's validity window.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:560
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);
}
if (scheduleParam.getStartTime().getTime() > scheduleParam.getEndTime().getTime()) {
log.warn("The start time must smaller than end time");
throw new ServiceException(Status.START_TIME_BIGGER_THAN_END_TIME_ERROR);
}
schedule.setStartTime(scheduleParam.getStartTime());
schedule.setEndTime(scheduleParam.getEndTime());
if (!CronUtils.isValidExpression(scheduleParam.getCrontab())) {
log.error("Schedule crontab verify failure, crontab:{}.", scheduleParam.getCrontab());
throw new ServiceException(Status.SCHEDULE_CRON_CHECK_FAILED, scheduleParam.getCrontab());
}
schedule.setCrontab(scheduleParam.getCrontab());
validateMissedFirePolicy(scheduleParam);
if (scheduleParam.isMissedFirePolicySet() && scheduleParam.getMissedFirePolicy() != null) {
schedule.setMissedFirePolicy(scheduleParam.getMissedFirePolicy());
}
schedule.setTimezoneId(scheduleParam.getTimezoneId());
}
if (warningType != null) {
schedule.setWarningType(warningType);View on GitHub (pinned to 02eac45a1b)
Solutions
- Swap or correct the timestamps so startTime < endTime.
- Confirm both values use the same unit (epoch milliseconds) and timezone handling.
- Add a client-side check startTime < endTime before the API call.
- Log/inspect the raw JSON sent to verify field ordering wasn't swapped.
Example fix
// before
{"startTime":1730000000000,"endTime":1700000000000,"crontab":"0 0 12 * * ?"} // start > end
// after
{"startTime":1700000000000,"endTime":1730000000000,"crontab":"0 0 12 * * ?"} Defensive patterns
Strategy: validation
Validate before calling
if (scheduleParam.getStartTime().getTime() > scheduleParam.getEndTime().getTime()) {
throw new IllegalArgumentException("startTime must be before endTime");
} Try / catch
try {
schedulerService.updateSchedule(loginUser, projectCode, id, scheduleExpression, ...);
} catch (ServiceException e) {
if (e.getCode() == Status.START_TIME_BIGGER_THAN_END_TIME_ERROR.getCode()) {
// swap or correct the timestamps, then retry
}
} Prevention
- Confirm both timestamps are epoch milliseconds (not seconds)
- Check timezone conversions that can invert ordering
- Assert start < end in tests generating schedule payloads
- Sort timestamps programmatically instead of hand-entering them
When it happens
Trigger: Submitting a scheduleExpression where the startTime epoch-millis value is greater than the endTime value.
Common situations: Timezone conversion bugs shifting one timestamp; users entering a year in the wrong order; scripts generating endTime from a miscalculated offset; milliseconds vs seconds confusion making one value 1000x smaller/larger.
Related errors
- SCHEDULE_START_TIME_END_TIME_SAME
- START_TIME_BIGGER_THAN_END_TIME_ERROR
- 10141
- REQUEST_PARAMS_NOT_VALID_ERROR
- PARSE_TO_CRON_EXPRESSION_ERROR
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/4624a1ede4d88ab9.
Report an issue: GitHub.