{"record":{"id":"cacfff28a6e8cce8","repo":"goharbor/harbor","slug":"enqueue-timestamp-missing-for-scheduled-job","errorCode":null,"errorMessage":"enqueue timestamp missing for scheduled job","messagePattern":"enqueue timestamp missing for scheduled job","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/jobservice/job/models.go","lineNumber":152,"sourceCode":"\t\tst.Info.JobKind != KindPeriodic &&\n\t\tst.Info.JobKind != KindScheduled {\n\t\treturn errors.Errorf(\"job kind is not supported: %s\", st.Info.JobKind)\n\t}\n\n\tstatus := Status(st.Info.Status)\n\tif err := status.Validate(); err != nil {\n\t\treturn err\n\t}\n\n\tif st.Info.JobKind == KindPeriodic {\n\t\tif utils.IsEmptyStr(st.Info.CronSpec) {\n\t\t\treturn errors.New(\"missing cron spec for periodic job\")\n\t\t}\n\t}\n\n\tif st.Info.JobKind == KindScheduled {\n\t\tif st.Info.RunAt == 0 {\n\t\t\treturn errors.New(\"enqueue timestamp missing for scheduled job\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Config job service config\ntype Config struct {\n\tRedisPoolConfig *config.RedisPoolConfig `json:\"redis_pool_config\"`\n}\n","sourceCodeStart":134,"sourceCodeEnd":163,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/jobservice/job/models.go#L134-L163","documentation":"Validation guard in Status.Validate for scheduled jobs: a job marked KindScheduled must carry a non-zero RunAt enqueue timestamp, otherwise its schedule trigger time is unknown and it can never fire. Fires when a scheduled job's status is checked but its metadata lacks the scheduled run time.","triggerScenarios":"Thrown at src/jobservice/job/models.go:152 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set Info.RunAt to a non-zero unix timestamp of the planned execution time before creating the scheduled job","Use KindGeneric or KindPeriodic if the job is not intended to run at a specific time"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}