paperclipai/paperclip · error · Error

Value ${value} out of range [${spec.min}–${spec.max}] for cr

Error message

Value ${value} out of range [${spec.min}–${spec.max}] for cron ${spec.name} field

What it means

Bounds check in validateBounds (called per value from parseField): a parsed integer lies outside the field's min–max (e.g. minute 60, dom 0, month 13). The message reports the value, the allowed closed range, and the field name.

Source

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

    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`,
    );
  }
}

// ---------------------------------------------------------------------------
// Public API
// ---------------------------------------------------------------------------

/**
 * Parse a cron expression string into a structured {@link ParsedCron}.
 *
 * @param expression — A standard 5-field cron expression.
 * @returns Parsed cron with sorted valid values for each field.
 * @throws {Error} on invalid syntax.
 *
 * @example
 * ```ts

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Change the value in the named cron field to fall within the allowed range shown.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/cron.ts:180 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/2aa646842ad0a559. Report an issue: GitHub.