{"record":{"id":"8f3aa659d0c0823f","repo":"sickn33/agentic-awesome-skills","slug":"invalid-l-syntax-in-day-of-week-trimmed","errorCode":null,"errorMessage":"Invalid \"L\" syntax in day-of-week: \"${trimmed}\"","messagePattern":"Invalid \"L\" syntax in day-of-week: \"(.+?)\"","errorType":"validation","errorClass":"CronError","httpStatus":null,"severity":"error","filePath":"skills/cron-doctor/scripts/cron-engine.js","lineNumber":56,"sourceCode":"  const trimmed = String(raw).trim();\n  if (trimmed === '') throw new CronError(`Field ${fieldIndex + 1} (${fieldDef.name}) is empty`, fieldIndex);\n\n  const out = { raw: trimmed, values: null, special: null };\n\n  // Special: day-of-week \"#\" (nth weekday)\n  if (fieldDef.key === 'dow' && trimmed.includes('#')) {\n    const m = trimmed.match(/^([0-7A-Za-z]+)#([1-5])$/);\n    if (!m) throw new CronError(`Invalid \"#\" 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: 'hash', dow: dowNum, nth: parseInt(m[2], 10) };\n    return out;\n  }\n\n  // Special: day-of-week \"L\" (last weekday)\n  if (fieldDef.key === 'dow' && /L$/i.test(trimmed)) {\n    const m = trimmed.match(/^([0-7A-Za-z]+)L$/i);\n    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);","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/sickn33/agentic-awesome-skills/blob/58d857988fcfac6986206bca2b2fe223aa437e4b/skills/cron-doctor/scripts/cron-engine.js#L38-L74","documentation":"Error \"Invalid \"L\" syntax in day-of-week: \"${trimmed}\"\" thrown in sickn33/agentic-awesome-skills.","triggerScenarios":"Thrown at skills/cron-doctor/scripts/cron-engine.js:56 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"}