sickn33/agentic-awesome-skills · error · CronError

Invalid "W" syntax in day-of-month: "${trimmed}"

Error message

Invalid "W" syntax in day-of-month: "${trimmed}"

What it means

Error "Invalid "W" syntax in day-of-month: "${trimmed}"" thrown in sickn33/agentic-awesome-skills.

Source

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

    if (!m) throw new CronError(`Invalid "L" syntax in day-of-week: "${trimmed}"`, fieldIndex);
    let dowNum = parseSingleNum(m[1], fieldDef, fieldIndex);
    if (dowNum === 7) dowNum = 0;
    out.special = { kind: 'dowLast', dow: dowNum };
    return out;
  }

  // Special: day-of-month "L" (last day)
  if (fieldDef.key === 'dom' && /^L/i.test(trimmed)) {
    const m = trimmed.match(/^L(?:-(\d+))?$/i);
    if (!m) throw new CronError(`Invalid "L" syntax in day-of-month: "${trimmed}"`, fieldIndex);
    out.special = { kind: 'domLast', offset: m[1] ? parseInt(m[1], 10) : 0 };
    return out;
  }

  // Special: day-of-month "W" (nearest weekday)
  if (fieldDef.key === 'dom' && /W$/i.test(trimmed)) {
    const m = trimmed.match(/^(\d+)W$/i);
    if (!m) throw new CronError(`Invalid "W" syntax in day-of-month: "${trimmed}"`, fieldIndex);
    const day = parseInt(m[1], 10);
    if (day < fieldDef.min || day > fieldDef.max) {
      throw new CronError(`Day-of-month "${day}W" out of range (${fieldDef.min}-${fieldDef.max})`, fieldIndex);
    }
    out.special = { kind: 'weekday', day: day };
    return out;
  }

  // Standard parsing
  const values = new Set();
  const items = trimmed.split(',');
  for (const item of items) {
    parseItem(item, fieldDef, fieldIndex, values);
  }
  out.values = values;
  return out;
}

View on GitHub (pinned to 58d857988f)

When it happens

Trigger: Thrown at skills/cron-doctor/scripts/cron-engine.js:74 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/813f059ec496a488. Report an issue: GitHub.