paperclipai/paperclip · error · Error

Empty result for cron ${spec.name} field

Error message

Empty result for cron ${spec.name} field

What it means

Post-loop guard in parseField: after processing all comma-separated parts, the accumulated value set is empty — every element expanded to nothing (e.g. a step whose range excludes all values). The field is unusable, so parsing aborts instead of returning an always-false schedule.

Source

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

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

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

/**

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Fix the named cron field so it selects at least one value.
Defensive patterns

Strategy: validation

When it happens

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