{"record":{"id":"0fa48e6fb9b31178","repo":"goharbor/harbor","slug":"found-more-than-one-scheduled-scan-all-job-please","errorCode":null,"errorMessage":"found more than one scheduled scan all job, please ensure that only one schedule left","messagePattern":"found more than one scheduled scan all job, please ensure that only one schedule left","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/server/v2.0/handler/scan_all.go","lineNumber":226,"sourceCode":"\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}\n\nfunc (s *scanAllAPI) getScanAllSchedule(ctx context.Context) (*scheduler.Schedule, error) {\n\tquery := q.New(q.KeyWords{\"vendor_type\": job.ScanAllVendorType})\n\tschedules, err := s.scheduler.ListSchedules(ctx, query.First(q.NewSort(\"creation_time\", true)))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif len(schedules) > 1 {\n\t\treturn nil, fmt.Errorf(\"found more than one scheduled scan all job, please ensure that only one schedule left\")\n\t} else if len(schedules) == 0 {\n\t\treturn nil, nil\n\t}\n\n\treturn schedules[0], nil\n}\n\nfunc (s *scanAllAPI) getMetrics(ctx context.Context, trigger ...string) (*models.Stats, error) {\n\texecution, err := s.getLatestScanAllExecution(ctx, trigger...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsts := &models.Stats{}\n\tif execution != nil {\n\t\tif execution.Metrics != nil {\n\t\t\tmetrics := execution.Metrics\n","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/scan_all.go#L208-L244","documentation":"Error \"found more than one scheduled scan all job, please ensure that only one schedule left\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/scan_all.go:226 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"}