paperclipai/paperclip · error · Error

Invalid value "${trimmed}" in cron ${spec.name} field

Error message

Invalid value "${trimmed}" in cron ${spec.name} field

What it means

Fallback guard in parseField: the token is not a comma list element handled earlier, has no step or range syntax, is not the '*' wildcard, and fails parseInt — i.e. it is a bare non-numeric value like "mon" or "abc". The token and field name identify the fix.

Source

Thrown at server/src/services/cron.ts:163

      }
      for (let i = a; i <= b; i++) {
        values.add(i);
      }
      continue;
    }

    // Wildcard
    if (trimmed === "*") {
      for (let i = spec.min; i <= spec.max; i++) {
        values.add(i);
      }
      continue;
    }

    // Single value
    const val = parseInt(trimmed, 10);
    if (isNaN(val)) {
      throw new Error(
        `Invalid value "${trimmed}" in cron ${spec.name} field`,
      );
    }
    validateBounds(val, spec);
    values.add(val);
  }

  if (values.size === 0) {
    throw new Error(`Empty result for cron ${spec.name} field`);
  }

  return [...values].sort((a, b) => a - b);
}

function validateBounds(value: number, spec: FieldSpec): void {
  if (value < spec.min || value > spec.max) {
    throw new Error(
      `Value ${value} out of range [${spec.min}–${spec.max}] for cron ${spec.name} field`,

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Replace the invalid value in the named cron field with a valid number, name, range, or wildcard.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/cron.ts:163 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/33a72da8f799d315. Report an issue: GitHub.