stablyai/orca · warning

Hermes cron requires a schedule.

Error message

Hermes cron requires a schedule.

What it means

Thrown by normalizeHermesCronMutationInput() after trimming when input.schedule is empty (and prompt already passed). A Hermes cron requires a schedule expression (cron syntax) to run. The guard does not validate cron grammar here — only non-emptiness.

Source

Thrown at src/main/automations/external-manager.ts:423

function normalizeHermesCronMutationInput(input: ExternalAutomationCreateInput): {
  name: string
  prompt: string
  schedule: string
  workdir: string | null
} {
  if (input.provider !== 'hermes') {
    throw new Error('Only Hermes cron creation and editing are supported.')
  }
  const name = input.name.trim()
  const prompt = input.prompt.trim()
  const schedule = input.schedule.trim()
  const workdir = input.workdir?.trim() || null
  if (!prompt) {
    throw new Error('Hermes cron requires a prompt.')
  }
  if (!schedule) {
    throw new Error('Hermes cron requires a schedule.')
  }
  return {
    name: name || prompt.slice(0, 50).trim() || 'Hermes cron',
    prompt,
    schedule,
    workdir
  }
}

function hermesCronCreateArgs(input: {
  name: string
  prompt: string
  schedule: string
  workdir: string | null
}): string[] {
  const args = [
    'cron',
    'create',

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Default or require a schedule in the form (e.g. '0 * * * *') and validate non-empty before submitting.
  2. Coerce undefined to '' and surface a validation error instead of calling the API.
  3. After non-empty passes, also validate the cron expression parses to catch malformed schedules early.

Example fix

// before
createExternalAutomation({ provider: 'hermes', prompt: 'run x', schedule: '', ... }) // throws

// after
const schedule = rawSchedule.trim() || '0 * * * *'
if (!isValidCron(schedule)) throw new UserError('Invalid schedule.')
createExternalAutomation({ provider: 'hermes', prompt: 'run x', schedule, ... })
Defensive patterns

Strategy: validation

Validate before calling

function isNonEmptySchedule(v: unknown): boolean {
  return typeof v === 'string' && v.trim().length > 0
}

if (input.provider === 'hermes' && !isNonEmptySchedule(input.schedule)) {
  throw new UserError('Hermes cron needs a schedule.')
}
createExternalAutomation(input)

Type guard

function isNonEmptySchedule(v: unknown): v is string {
  return typeof v === 'string' && v.trim().length > 0
}

Try / catch

try {
  await createExternalAutomation(input)
} catch (e) {
  if ((e as Error).message === 'Hermes cron requires a schedule.') {
    throw new UserError('Please enter a cron schedule for the job.')
  }
  throw e
}

Prevention

When it happens

Trigger: Creating/editing a Hermes cron with a blank/whitespace-only schedule; a schedule picker that returned undefined or ''; a default cron string that failed to load.

Common situations: User leaves the schedule field empty; a cron-picker UI bug returns ''; a template/import omitted the schedule field.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/7ac42d23b361d426. Report an issue: GitHub.