{"record":{"id":"331ffe4011c745dc","repo":"nexu-io/open-design","slug":"schedule-kind-requires-hh-mm-tz","errorCode":null,"errorMessage":"--schedule ${kind} requires :HH:MM[:TZ]","messagePattern":"--schedule (.+?) requires :HH:MM\\[:TZ\\]","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/cli.ts","lineNumber":10507,"sourceCode":"\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];\n    const time = `${hh.padStart(2, '0')}:${mm.padStart(2, '0')}`;\n    if (!/^[0-2]\\d:[0-5]\\d$/.test(time)) {\n      throw new Error(`--schedule ${kind} time must be HH:MM (24h)`);\n    }\n    const timezone = parts.slice(3).join(':') || 'UTC';\n    return { kind, time, timezone };\n  }\n  if (kind === 'weekly') {\n    if (parts.length < 4) {\n      throw new Error('--schedule weekly requires :DAY:HH:MM[:TZ] (DAY is 0-6 or sun/mon/...)');\n    }\n    const dayToken = String(parts[1]).toLowerCase();\n    let weekday;\n    if (/^[0-6]$/.test(dayToken)) {\n      weekday = Number(dayToken);","sourceCodeStart":10489,"sourceCodeEnd":10525,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/cli.ts#L10489-L10525","documentation":"Thrown by parseScheduleFlag for the `daily` or `weekdays` kind when the value does not have enough colon-separated parts to contain at least HH and MM. Format is `<kind>:HH:MM[:TZ]` (3 or 4 parts after split), so this fires when parts.length < 3.","triggerScenarios":"`--schedule daily:09`, `--schedule weekdays`, `--schedule daily:09:`, or `--schedule weekdays:09` — anything missing either the hour or the minute component (or both).","commonSituations":"User writes only the hour (`daily:09`) forgetting the minute; trailing colon with no minute (`daily:09:`); wrong kind picked by mistake (e.g. daily when hourly was intended); copy-paste from a doc that omitted the minute.","solutions":["Provide both HH and MM: `--schedule daily:09:00` or `--schedule weekdays:17:30:America/Los_Angeles`.","Confirm HH is 00-23 and MM is 00-59 (a separate error covers an out-of-range time).","If you only want an hourly cadence, switch to `hourly:<minute>`.","Re-run with --help to copy the exact grammar."],"exampleFix":"# before\nod automation create --name d --prompt-file p.txt --schedule daily:09\n# after\nod automation create --name d --prompt-file p.txt --schedule daily:09:00","handlingStrategy":"validation","validationCode":"function parseDailyWeekdays(raw) {\n  const parts = String(raw).split(':');\n  if (parts.length < 3) {\n    throw new Error(`--schedule ${parts[0]} requires :HH:MM[:TZ]`);\n  }\n  const time = `${parts[1].padStart(2,'0')}:${parts[2].padStart(2,'0')}`;\n  if (!/^[0-2]\\d:[0-5]\\d$/.test(time)) {\n    throw new Error(`--schedule ${parts[0]} time must be HH:MM (24h)`);\n  }\n  return { kind: parts[0], time, timezone: parts.slice(3).join(':') || 'UTC' };\n}","typeGuard":"const isDailyWeekdays = (v: unknown): v is string => {\n  if (typeof v !== 'string') return false;\n  const parts = v.split(':');\n  if (parts.length < 3) return false;\n  const time = `${parts[1].padStart(2,'0')}:${parts[2].padStart(2,'0')}`;\n  return (parts[0] === 'daily' || parts[0] === 'weekdays') && /^[0-2]\\d:[0-5]\\d$/.test(time);\n};","tryCatchPattern":null,"preventionTips":["Provide both HH and MM: `daily:09:00` or `weekdays:17:30:America/Los_Angeles`.","Use 24-hour notation, HH 00-23 and MM 00-59.","Switch to `hourly:<minute>` if you only want an hourly cadence."],"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"}