nexu-io/open-design · error · Error
--schedule weekly requires :DAY:HH:MM[:TZ] (DAY is 0-6 or su
Error message
--schedule weekly requires :DAY:HH:MM[:TZ] (DAY is 0-6 or sun/mon/...)
What it means
Thrown by parseScheduleFlag when a `--schedule weekly:...` flag has fewer than four colon-separated parts. Weekly requires the full shape `weekly:DAY:HH:MM[:TZ]`, so kind + day + hour + minute is the minimum. The parser splits on `:` and checks `parts.length < 4`.
Source
Thrown at apps/daemon/src/cli.ts:10520
}
return { kind: 'hourly', minute };
}
if (kind === 'daily' || kind === 'weekdays') {
if (parts.length < 3) {
throw new Error(`--schedule ${kind} requires :HH:MM[:TZ]`);
}
const hh = parts[1];
const mm = parts[2];
const time = `${hh.padStart(2, '0')}:${mm.padStart(2, '0')}`;
if (!/^[0-2]\d:[0-5]\d$/.test(time)) {
throw new Error(`--schedule ${kind} time must be HH:MM (24h)`);
}
const timezone = parts.slice(3).join(':') || 'UTC';
return { kind, time, timezone };
}
if (kind === 'weekly') {
if (parts.length < 4) {
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}")`);View on GitHub (pinned to 5be4028344)
Solutions
- Supply the full form `weekly:<day>:<HH>:<MM>`, e.g. `--schedule weekly:mon:09:30`.
- Optionally add a timezone as a 5th segment: `weekly:mon:09:30:Europe/London`.
- If you only need a daily cadence, switch to `--schedule daily:HH:MM` instead.
Example fix
// before --schedule weekly:mon:09 // after --schedule weekly:mon:09:30
Defensive patterns
Strategy: validation
Validate before calling
// Ensure a weekly schedule has at least kind:DAY:HH:MM before parsing.
function weeklyHasEnoughParts(raw: string): boolean {
return raw.split(':').length >= 4;
} Try / catch
try {
parseScheduleFlag(raw);
} catch (err) {
if (err instanceof Error && /weekly requires :DAY:HH:MM/.test(err.message)) {
// prompt user for the full weekly form
}
throw err;
} Prevention
- Remember the weekly shape is kind:DAY:HH:MM[:TZ] — four colon segments minimum.
- Use the daily/weekdays form if you do not actually need a specific weekday.
When it happens
Trigger: Running `od automation create --schedule weekly:mon` (only day), `--schedule weekly:mon:09` (day + hour, missing minute), or `--schedule weekly` alone.
Common situations: Forgetting that weekly needs both a day and a full time, or assuming it inherits a default time like the daily form does.
Related errors
- --schedule ${kind} time must be HH:MM (24h)
- --schedule weekly day must be 0-6 or sun..sat (got "${parts[
- --schedule weekly time must be HH:MM (24h)
- --schedule kind must be hourly|daily|weekdays|weekly (got "$
- --schedule is required. Forms: hourly:<minute> | daily:HH:MM
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/d4e0a8fc13c3ad65.
Report an issue: GitHub.