{"record":{"id":"64c6f31f83a44243","repo":"goharbor/harbor","slug":"bad-request-64c6f3","errorCode":"BAD_REQUEST","errorMessage":"invalid cron string for scheduled scan all: %s, error: %v","messagePattern":"invalid cron string for scheduled scan all: (.+?), error: (.+?)","errorType":"validation","errorClass":"github.com/goharbor/harbor/src/lib/errors.Error","httpStatus":400,"severity":"error","filePath":"src/server/v2.0/handler/scan_all.go","lineNumber":198,"sourceCode":"\n\treturn operation.NewGetLatestScanAllMetricsOK().WithPayload(stats)\n}\n\nfunc (s *scanAllAPI) GetLatestScheduledScanAllMetrics(ctx context.Context, _ operation.GetLatestScheduledScanAllMetricsParams) middleware.Responder {\n\tif err := s.requireAccess(ctx, rbac.ActionRead); err != nil {\n\t\treturn s.SendError(ctx, err)\n\t}\n\tstats, err := s.getMetrics(ctx, task.ExecutionTriggerSchedule)\n\tif err != nil {\n\t\treturn s.SendError(ctx, err)\n\t}\n\n\treturn operation.NewGetLatestScanAllMetricsOK().WithPayload(stats)\n}\n\nfunc (s *scanAllAPI) createOrUpdateScanAllSchedule(ctx context.Context, cronType, cron string, previous *scheduler.Schedule) (int64, error) {\n\tif err := utils.ValidateCronString(cron); err != nil {\n\t\treturn 0, errors.New(nil).WithCode(errors.BadRequestCode).\n\t\t\tWithMessagef(\"invalid cron string for scheduled scan all: %s, error: %v\", cron, err)\n\t}\n\tif previous != nil {\n\t\tif cronType == previous.CRONType && cron == previous.CRON {\n\t\t\treturn previous.ID, nil\n\t\t}\n\n\t\tif err := s.scheduler.UnScheduleByID(ctx, previous.ID); err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t}\n\n\tcbParams := map[string]any{\n\t\t// the operator of schedule job is harbor-jobservice\n\t\t\"operator\": secret.JobserviceUser,\n\t}\n\treturn s.scheduler.Schedule(ctx, job.ScanAllVendorType, 0, cronType, cron, scan.ScanAllCallback, cbParams, nil)\n}","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/scan_all.go#L180-L216","documentation":"Error \"invalid cron string for scheduled scan all: %s, error: %v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/scan_all.go:198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}