nexu-io/open-design · error · Error

--schedule kind must be hourly|daily|weekdays|weekly (got "$

Error message

--schedule kind must be hourly|daily|weekdays|weekly (got "${kind}")

What it means

Thrown by parseScheduleFlag when the schedule kind — the first colon-separated segment — is not one of `hourly`, `daily`, `weekdays`, or `weekly`. This is the fall-through after all four kind branches have been checked, so the value is genuinely unrecognized rather than malformed for a known kind.

Source

Thrown at apps/daemon/src/cli.ts:10538

      throw new Error('--schedule weekly requires :DAY:HH:MM[:TZ] (DAY is 0-6 or sun/mon/...)');
    }
    const dayToken = String(parts[1]).toLowerCase();
    let weekday;
    if (/^[0-6]$/.test(dayToken)) {
      weekday = Number(dayToken);
    } else if (AUTOMATION_WEEKDAY_TOKENS[dayToken] !== undefined) {
      weekday = AUTOMATION_WEEKDAY_TOKENS[dayToken];
    } else {
      throw new Error(`--schedule weekly day must be 0-6 or sun..sat (got "${parts[1]}")`);
    }
    const time = `${parts[2].padStart(2, '0')}:${parts[3].padStart(2, '0')}`;
    if (!/^[0-2]\d:[0-5]\d$/.test(time)) {
      throw new Error('--schedule weekly time must be HH:MM (24h)');
    }
    const timezone = parts.slice(4).join(':') || 'UTC';
    return { kind: 'weekly', weekday, time, timezone };
  }
  throw new Error(`--schedule kind must be hourly|daily|weekdays|weekly (got "${kind}")`);
}

function parseAutomationTarget(flags) {
  const raw = flags.target;
  if (raw == null) {
    if (flags.project) return { mode: 'reuse', projectId: String(flags.project) };
    return { mode: 'create_each_run' };
  }
  const value = String(raw);
  if (
    value === 'worktree' ||
    value === 'new-project' ||
    value === 'create-each-run' ||
    value === 'create_each_run'
  ) {
    return { mode: 'create_each_run' };
  }
  if (value === 'reuse') {

View on GitHub (pinned to 5be4028344)

Solutions

  1. Use one of the supported kinds: hourly, daily, weekdays, or weekly.
  2. For monthly cadence, approximate with weekly runs on the target weekdays, or run multiple weekly schedules.
  3. Check the spelling of the kind prefix exactly (all lowercase).

Example fix

// before
--schedule monthly:1:09:30
// after
--schedule weekly:1:09:30
Defensive patterns

Strategy: validation

Validate before calling

const SCHEDULE_KINDS = new Set(['hourly','daily','weekdays','weekly']);
function isKnownScheduleKind(raw: string): boolean {
  const kind = raw.split(':')[0];
  return SCHEDULE_KINDS.has(kind);
}

Try / catch

try {
  parseScheduleFlag(raw);
} catch (err) {
  if (err instanceof Error && /kind must be hourly\|daily/.test(err.message)) {
    // offer the supported kinds to the user
  }
  throw err;
}

Prevention

When it happens

Trigger: Running `--schedule monthly:1:09:30`, `--schedule cron:0 9 * * *`, `--schedule once:2024-01-01T09:00:00`, or any typo like `--schedule dailt:09:30`.

Common situations: Expecting the CLI to support a cadence it does not (monthly, yearly, cron, one-shot), or misspelling a supported kind. There is no monthly/yearly/cron form.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/16b5323053186bdb. Report an issue: GitHub.