{"record":{"id":"47d0b1988809f825","repo":"semaphoreui/semaphore","slug":"error-at-schedules-d-s","errorCode":null,"errorMessage":"error at schedules[%d]: %s","messagePattern":"error at schedules\\[(.+?)\\]: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/project/restore.go","lineNumber":701,"sourceCode":"\t}\n\n\tfor i, o := range backup.Integration {\n\t\tif err := o.Restore(&b); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error at integrations[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\n\tfor _, o := range backup.IntegrationAliases {\n\t\talias := db.IntegrationAlias{\n\t\t\tAlias:     o,\n\t\t\tProjectID: b.meta.ID,\n\t\t}\n\t\t_, _ = b.store.CreateIntegrationAlias(alias)\n\t}\n\n\tfor i, o := range backup.Schedules {\n\t\tif err := o.Restore(&b); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error at schedules[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\n\tfor i, o := range backup.Runners {\n\t\tif err := o.Restore(&b); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error at runners[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\n\t// Workflows are restored last: their nodes reference templates, inventories\n\t// and environments by name, all of which must already exist in the project.\n\tfor i, o := range backup.Workflows {\n\t\tif err := o.Restore(&b); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error at workflows[%d]: %s\", i, err.Error())\n\t\t}\n\t}\n\n\treturn &newProject, nil","sourceCodeStart":683,"sourceCodeEnd":719,"githubUrl":"https://github.com/semaphoreui/semaphore/blob/1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa/services/project/restore.go#L683-L719","documentation":"Produced during project restore in services/project/restore.go when the i-th entry of the backup's Schedules list fails in its Restore method. It is an aggregation wrapper: the %s carries the underlying schedule-specific failure (invalid cron, missing template reference, store error) and the %d identifies which schedules[] entry in the backup is broken, so a single bad schedule can be pinpointed and fixed without abandoning the whole restore.","triggerScenarios":"Thrown at services/project/restore.go:701 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the reported index to inspect that schedules[] entry in the backup file for malformed or dangling data","Ensure the schedule's referenced template/task exists in the restore target (restore templates first, which this function does before schedules)","Correct or drop the offending schedule entry in the backup and retry the restore","Check the embedded error text for the concrete cause — cron parsing, missing reference, or database failure — and address that cause"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1774ccb71a0a8b82eb74ea24c23ac9ab713de2fa","analyzedAt":"2026-09-07T11:00:33.293Z","contentChangedAt":"2026-09-07T11:00:33.293Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}