sickn33/agentic-awesome-skills · error · CronError

Field ${fieldIndex + 1} (${fieldDef.name}) is empty

Error message

Field ${fieldIndex + 1} (${fieldDef.name}) is empty

What it means

Error "Field ${fieldIndex + 1} (${fieldDef.name}) is empty" thrown in sickn33/agentic-awesome-skills.

Source

Thrown at skills/cron-doctor/scripts/cron-engine.js:39

  constructor(message, fieldIndex) {
    super(message);
    this.name = 'CronError';
    this.fieldIndex = fieldIndex;
  }
}

// ---- Name resolution ----
function resolveName(token, names) {
  if (!names) return null;
  const up = token.toUpperCase();
  const idx = names.indexOf(up);
  return idx === -1 ? null : idx;
}

// ---- Field parsing ----
function parseField(raw, fieldDef, fieldIndex) {
  const trimmed = String(raw).trim();
  if (trimmed === '') throw new CronError(`Field ${fieldIndex + 1} (${fieldDef.name}) is empty`, fieldIndex);

  const out = { raw: trimmed, values: null, special: null };

  // Special: day-of-week "#" (nth weekday)
  if (fieldDef.key === 'dow' && trimmed.includes('#')) {
    const m = trimmed.match(/^([0-7A-Za-z]+)#([1-5])$/);
    if (!m) throw new CronError(`Invalid "#" syntax in day-of-week: "${trimmed}"`, fieldIndex);
    let dowNum = parseSingleNum(m[1], fieldDef, fieldIndex);
    if (dowNum === 7) dowNum = 0;
    out.special = { kind: 'hash', dow: dowNum, nth: parseInt(m[2], 10) };
    return out;
  }

  // Special: day-of-week "L" (last weekday)
  if (fieldDef.key === 'dow' && /L$/i.test(trimmed)) {
    const m = trimmed.match(/^([0-7A-Za-z]+)L$/i);
    if (!m) throw new CronError(`Invalid "L" syntax in day-of-week: "${trimmed}"`, fieldIndex);
    let dowNum = parseSingleNum(m[1], fieldDef, fieldIndex);

View on GitHub (pinned to 58d857988f)

When it happens

Trigger: Thrown at skills/cron-doctor/scripts/cron-engine.js:39 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sickn33/agentic-awesome-skills@58d857988f (2026-08-26). Data as JSON: /api/errors/43af9ae0c1c5842f. Report an issue: GitHub.