{"record":{"id":"b730c5125207f42a","repo":"windmill-labs/windmill","slug":"schedule-schedulepath-not-found","errorCode":null,"errorMessage":"Schedule ${schedulePath} not found","messagePattern":"Schedule (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/schedule/schedule.ts","lineNumber":375,"sourceCode":"    \"Set the email (run-as user) for a schedule (requires admin or wm_deployers group)\"\n  )\n  .arguments(\"<path:string> <email:string>\")\n  .action((async (opts: any, schedulePath: string, email: string) => {\n    const workspace = await resolveWorkspace(opts);\n    await requireLogin(opts);\n\n    const cache = new Map<string, { username: string; email: string }>();\n    const username = await lookupUsernameByEmail(\n      workspace.workspaceId,\n      email,\n      cache,\n    );\n\n    const remote = await wmill.getSchedule({\n      workspace: workspace.workspaceId,\n      path: schedulePath,\n    });\n    if (!remote) throw new Error(`Schedule ${schedulePath} not found`);\n\n    await wmill.updateSchedule({\n      workspace: workspace.workspaceId,\n      path: schedulePath,\n      requestBody: {\n        ...(remote as any),\n        permissioned_as: `u/${username}`,\n        preserve_permissioned_as: true,\n      } as any,\n    });\n    log.info(\n      colors.green(\n        `Updated permissioned_as for schedule ${schedulePath} to ${email} (username: ${username})`\n      )\n    );\n  }) as any);\n\nexport default command;","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/schedule/schedule.ts#L357-L393","documentation":"Thrown by `wmill schedule set-email` when the remote getSchedule call reports not-found: no schedule exists at that exact path in the workspace, typically because of a typo, wrong folder prefix, or the schedule was deleted.","triggerScenarios":"Thrown at cli/src/commands/schedule/schedule.ts:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `wmill schedule list` to see the exact remote schedule paths.","Check the path spelling including the u/<user>/ or f/<folder>/ prefix.","Recreate the schedule if it was deleted, then retry set-email."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}