{"record":{"id":"a09cb3afedb1bd5c","repo":"apache/dolphinscheduler","slug":"10024","errorCode":"10024","errorMessage":"scheduler crontab expression validation failure: {0}","messagePattern":"scheduler crontab expression validation failure: (.+?)","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java","lineNumber":567,"sourceCode":"            ScheduleParam scheduleParam = JSONUtils.parseObject(scheduleExpression, ScheduleParam.class);\n            if (scheduleParam == null) {\n                log.warn(\"Parameter scheduleExpression is invalid, so parse cron error.\");\n                throw new ServiceException(Status.PARSE_TO_CRON_EXPRESSION_ERROR);\n            }\n            if (DateUtils.differSec(scheduleParam.getStartTime(), scheduleParam.getEndTime()) == 0) {\n                log.warn(\"The start time must not be the same as the end or time can not be null.\");\n                throw new ServiceException(Status.SCHEDULE_START_TIME_END_TIME_SAME);\n            }\n            if (scheduleParam.getStartTime().getTime() > scheduleParam.getEndTime().getTime()) {\n                log.warn(\"The start time must smaller than end time\");\n                throw new ServiceException(Status.START_TIME_BIGGER_THAN_END_TIME_ERROR);\n            }\n\n            schedule.setStartTime(scheduleParam.getStartTime());\n            schedule.setEndTime(scheduleParam.getEndTime());\n            if (!CronUtils.isValidExpression(scheduleParam.getCrontab())) {\n                log.error(\"Schedule crontab verify failure, crontab:{}.\", scheduleParam.getCrontab());\n                throw new ServiceException(Status.SCHEDULE_CRON_CHECK_FAILED, scheduleParam.getCrontab());\n            }\n            schedule.setCrontab(scheduleParam.getCrontab());\n            validateMissedFirePolicy(scheduleParam);\n            if (scheduleParam.isMissedFirePolicySet() && scheduleParam.getMissedFirePolicy() != null) {\n                schedule.setMissedFirePolicy(scheduleParam.getMissedFirePolicy());\n            }\n            schedule.setTimezoneId(scheduleParam.getTimezoneId());\n        }\n\n        if (warningType != null) {\n            schedule.setWarningType(warningType);\n        }\n\n        schedule.setWarningGroupId(warningGroupId);\n\n        if (failureStrategy != null) {\n            schedule.setFailureStrategy(failureStrategy);\n        }","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java#L549-L585","documentation":"updateSchedule validates the crontab in the scheduleExpression with CronUtils.isValidExpression; on failure SCHEDULE_CRON_CHECK_FAILED is thrown including the offending crontab. Unlike error 250 this is a boolean validity check (no exception-based parsing), but the cause is the same: the crontab is not a valid Quartz expression.","triggerScenarios":"Updating a schedule with a crontab that fails CronUtils.isValidExpression: wrong field count, illegal characters, out-of-range day/month values, or unsupported syntax.","commonSituations":"5-field Unix cron pasted into the API; '?' vs '*' misuse; day-of-month + day-of-week both set to '*' conflicting semantics users expect; empty crontab string.","solutions":["Correct the crontab to valid Quartz format, e.g. '0 0 12 * * ?'.","Run CronUtils.isValidExpression(crontab) (or an online Quartz cron validator) before submitting.","Use '?' in either dayOfMonth or dayOfWeek when the other is constrained.","Migrate Unix cron syntax to Quartz (add seconds field, convert as needed)."],"exampleFix":"// before\n{\"startTime\":1700000000000,\"endTime\":1730000000000,\"crontab\":\"0 12 * *\"}   // invalid\n\n// after\n{\"startTime\":1700000000000,\"endTime\":1730000000000,\"crontab\":\"0 0 12 * * ?\"}","handlingStrategy":"validation","validationCode":"if (!CronUtils.isValidExpression(scheduleParam.getCrontab())) {\n    throw new IllegalArgumentException(\"Invalid Quartz crontab: \" + scheduleParam.getCrontab());\n}","typeGuard":null,"tryCatchPattern":"try {\n    schedulerService.updateSchedule(loginUser, projectCode, id, scheduleExpression, ...);\n} catch (ServiceException e) {\n    if (e.getCode() == Status.SCHEDULE_CRON_CHECK_FAILED.getCode()) {\n        // e.getMessage() contains the offending crontab; fix and resubmit\n    }\n}","preventionTips":["Pre-validate crontab with CronUtils.isValidExpression","Use Quartz cron syntax (6-7 fields, seconds first)","Convert Unix 5-field crons before submitting","Use '?' not '*' when constraining dayOfMonth/dayOfWeek separately"],"tags":["cron","validation","quartz","scheduler"],"backgroundTag":"invalid-regex-pattern","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}