{"record":{"id":"ed3b81574300e93f","repo":"nexu-io/open-design","slug":"schedule-is-required-forms-hourly-minute-d","errorCode":null,"errorMessage":"--schedule is required. Forms: hourly:<minute> | daily:HH:MM[:TZ] | weekdays:HH:MM[:TZ] | weekly:DAY:HH:MM[:TZ]","messagePattern":"--schedule is required\\. Forms: hourly:<minute> \\| daily:HH:MM\\[:TZ\\] \\| weekdays:HH:MM\\[:TZ\\] \\| weekly:DAY:HH:MM\\[:TZ\\]","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/cli.ts","lineNumber":10492,"sourceCode":"  console.log(`verifyEnabled         ${formatMemoryConfigSwitch(data.verifyEnabled)}`);\n  return;\n}\n\n// ---------------------------------------------------------------------------\n// Subcommand: od automation …\n//\n// Headless surface for the Automations tab. This is the dual-track contract:\n// every capability the Automations UI exposes is reachable here so an\n// external agent (hermes-agent, openclaw, custom Slackbot, etc.) can run\n// the full lifecycle — list, create, fire, harvest, retire — without\n// rendering a page. Storage is /api/routines on the local daemon; the\n// \"routine\" name is the implementation detail, \"automation\" is the user-\n// facing surface.\n// ---------------------------------------------------------------------------\n\nfunction parseScheduleFlag(raw) {\n  if (!raw || typeof raw !== 'string') {\n    throw new Error(\n      '--schedule is required. Forms: hourly:<minute> | daily:HH:MM[:TZ] | weekdays:HH:MM[:TZ] | weekly:DAY:HH:MM[:TZ]',\n    );\n  }\n  const parts = raw.split(':');\n  const kind = parts[0];\n  if (kind === 'hourly') {\n    const minute = Number(parts[1]);\n    if (!Number.isInteger(minute) || minute < 0 || minute > 59) {\n      throw new Error('--schedule hourly requires :<minute>, 0-59');\n    }\n    return { kind: 'hourly', minute };\n  }\n  if (kind === 'daily' || kind === 'weekdays') {\n    if (parts.length < 3) {\n      throw new Error(`--schedule ${kind} requires :HH:MM[:TZ]`);\n    }\n    const hh = parts[1];\n    const mm = parts[2];","sourceCodeStart":10474,"sourceCodeEnd":10510,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/cli.ts#L10474-L10510","documentation":"Thrown by parseScheduleFlag when the --schedule value is missing (null/undefined), empty, or not a string. parseScheduleFlag backs `od automation create` and `od automation update` for the --schedule flag, which is required for scheduled automations. The message lists every accepted form.","triggerScenarios":"Creating or updating an automation with `--schedule` omitted, set to empty (`--schedule=`), or with no value at all when --schedule is a string flag. Also when the caller passes `--schedule` expecting a default.","commonSituations":"Building a scheduled automation but forgetting --schedule; copy-pasting a command that previously used a trigger-only automation; a wrapper script that conditionally passes --schedule and the condition evaluated false.","solutions":["Provide --schedule with one of the documented forms: hourly:<minute>, daily:HH:MM[:TZ], weekdays:HH:MM[:TZ], weekly:DAY:HH:MM[:TZ].","If you want a non-scheduled (trigger-only) automation, omit --schedule entirely rather than passing an empty value.","Validate the schedule string in your wrapper script before invoking od.","Use `od automation create --help` to see the schedule grammar examples."],"exampleFix":"# before\nod automation create --name daily --prompt-file p.txt --schedule\n# after\nod automation create --name daily --prompt-file p.txt --schedule daily:09:00:America/New_York","handlingStrategy":"validation","validationCode":"const SCHEDULE_RE = /^(hourly:\\d{1,2}|daily:\\d{1,2}:\\d{2}(:[^:]+)?|weekdays:\\d{1,2}:\\d{2}(:[^:]+)?|weekly:[0-6a-z]{3}:\\d{1,2}:\\d{2}(:[^:]+)?)$/;\nif (!SCHEDULE_RE.test(String(rawSchedule))) {\n  throw new Error('--schedule is required. Forms: hourly:<minute> | daily:HH:MM[:TZ] | weekdays:HH:MM[:TZ] | weekly:DAY:HH:MM[:TZ]');\n}","typeGuard":"const isScheduleString = (v: unknown): v is string =>\n  typeof v === 'string' &&\n  /^(hourly:|daily:|weekdays:|weekly:)/.test(v);","tryCatchPattern":null,"preventionTips":["Pass --schedule with one of the four documented forms.","For trigger-only automations, omit --schedule entirely.","Validate the schedule string in wrapper scripts before invoking od."],"tags":["cli","automation","schedule","argument-parsing","validation"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}