{"record":{"id":"813f059ec496a488","repo":"sickn33/agentic-awesome-skills","slug":"invalid-w-syntax-in-day-of-month-trimmed","errorCode":null,"errorMessage":"Invalid \"W\" syntax in day-of-month: \"${trimmed}\"","messagePattern":"Invalid \"W\" syntax in day-of-month: \"(.+?)\"","errorType":"validation","errorClass":"CronError","httpStatus":null,"severity":"error","filePath":"skills/cron-doctor/scripts/cron-engine.js","lineNumber":74,"sourceCode":"    if (!m) throw new CronError(`Invalid \"L\" syntax in day-of-week: \"${trimmed}\"`, fieldIndex);\n    let dowNum = parseSingleNum(m[1], fieldDef, fieldIndex);\n    if (dowNum === 7) dowNum = 0;\n    out.special = { kind: 'dowLast', dow: dowNum };\n    return out;\n  }\n\n  // Special: day-of-month \"L\" (last day)\n  if (fieldDef.key === 'dom' && /^L/i.test(trimmed)) {\n    const m = trimmed.match(/^L(?:-(\\d+))?$/i);\n    if (!m) throw new CronError(`Invalid \"L\" syntax in day-of-month: \"${trimmed}\"`, fieldIndex);\n    out.special = { kind: 'domLast', offset: m[1] ? parseInt(m[1], 10) : 0 };\n    return out;\n  }\n\n  // Special: day-of-month \"W\" (nearest weekday)\n  if (fieldDef.key === 'dom' && /W$/i.test(trimmed)) {\n    const m = trimmed.match(/^(\\d+)W$/i);\n    if (!m) throw new CronError(`Invalid \"W\" syntax in day-of-month: \"${trimmed}\"`, fieldIndex);\n    const day = parseInt(m[1], 10);\n    if (day < fieldDef.min || day > fieldDef.max) {\n      throw new CronError(`Day-of-month \"${day}W\" out of range (${fieldDef.min}-${fieldDef.max})`, fieldIndex);\n    }\n    out.special = { kind: 'weekday', day: day };\n    return out;\n  }\n\n  // Standard parsing\n  const values = new Set();\n  const items = trimmed.split(',');\n  for (const item of items) {\n    parseItem(item, fieldDef, fieldIndex, values);\n  }\n  out.values = values;\n  return out;\n}\n","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/sickn33/agentic-awesome-skills/blob/58d857988fcfac6986206bca2b2fe223aa437e4b/skills/cron-doctor/scripts/cron-engine.js#L56-L92","documentation":"Error \"Invalid \"W\" syntax in day-of-month: \"${trimmed}\"\" thrown in sickn33/agentic-awesome-skills.","triggerScenarios":"Thrown at skills/cron-doctor/scripts/cron-engine.js:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"58d857988fcfac6986206bca2b2fe223aa437e4b","analyzedAt":"2026-08-26T11:55:59.350Z","schemaVersion":2},"datasetVersion":"2026-08-26T14:46:13.012Z"}