goharbor/harbor · error · errs.baseError
10003
10003
Error message
'cron_spec' must be specified for the %s job
What it means
Validation in validJobReq: a periodic job request omits cron_spec, so the recurrence cannot be defined and the job launch request is rejected.
Solutions
- Provide a valid cron_spec in the job's metadata for periodic jobs
- Verify the job submission client includes cron parameters
- Use Scheduled/Generic kinds when cron is not intended
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/jobservice/core/controller.go:201 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/fc8c7cb80a399f7e.
Report an issue: GitHub.
Appendix: source
Thrown at src/jobservice/core/controller.go:201
if req.Job.Metadata.JobKind != job.KindGeneric &&
req.Job.Metadata.JobKind != job.KindPeriodic &&
req.Job.Metadata.JobKind != job.KindScheduled {
return errors.Errorf(
"job kind '%s' is not supported, only support '%s','%s','%s'",
req.Job.Metadata.JobKind,
job.KindGeneric,
job.KindScheduled,
job.KindPeriodic)
}
if req.Job.Metadata.JobKind == job.KindScheduled &&
req.Job.Metadata.ScheduleDelay == 0 {
return errors.Errorf("'schedule_delay' must be specified for %s job", job.KindScheduled)
}
if req.Job.Metadata.JobKind == job.KindPeriodic {
if utils.IsEmptyStr(req.Job.Metadata.Cron) {
return fmt.Errorf("'cron_spec' must be specified for the %s job", job.KindPeriodic)
}
if _, err := comUtils.CronParser().Parse(req.Job.Metadata.Cron); err != nil {
return fmt.Errorf("'cron_spec' is not correctly set: %s: %s", req.Job.Metadata.Cron, err)
}
}
return nil
}
View on GitHub (pinned to 7b2fd08cc5)