{"record":{"id":"cfd28c7487fc2b93","repo":"NousResearch/hermes-agent","slug":"unknown-recurrence-preset-r-one-of-join","errorCode":null,"errorMessage":"unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}","messagePattern":"unknown recurrence (.+?) — one of (.+?)","errorType":"validation","errorClass":"BlueprintFillError","httpStatus":null,"severity":"warning","filePath":"cron/blueprint_catalog.py","lineNumber":715,"sourceCode":"    repl: Dict[str, str] = {}\n\n    # time -> minute/hour\n    time_val = values.get(\"time\")\n    if \"{minute}\" in sched or \"{hour}\" in sched:\n        if not time_val:\n            raise BlueprintFillError(\"a time is required\")\n        m = _TIME_RE.match(str(time_val).strip())\n        if not m:\n            raise BlueprintFillError(f\"invalid time {time_val!r} — use HH:MM (24h)\")\n        repl[\"hour\"] = str(int(m.group(1)))\n        repl[\"minute\"] = str(int(m.group(2)))\n\n    # weekday set -> dow\n    if \"{dow}\" in sched:\n        if \"recurrence\" in values:\n            preset = str(values.get(\"recurrence\", \"everyday\")).lower()\n            if preset not in WEEKDAY_PRESETS:\n                raise BlueprintFillError(\n                    f\"unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}\"\n                )\n            repl[\"dow\"] = WEEKDAY_PRESETS[preset]\n        elif \"day\" in values:\n            day = str(values.get(\"day\", \"\")).lower()\n            if day not in _DAY_TO_DOW:\n                raise BlueprintFillError(f\"unknown day {day!r}\")\n            repl[\"dow\"] = _DAY_TO_DOW[day]\n        else:\n            repl[\"dow\"] = \"*\"\n\n    # interval (minutes) for */N schedules\n    if \"{interval_min}\" in sched:\n        iv = str(values.get(\"interval_min\", \"\")).strip()\n        if not iv.isdigit() or int(iv) <= 0:\n            raise BlueprintFillError(f\"invalid interval {iv!r} — minutes as a positive integer\")\n        repl[\"interval_min\"] = iv\n","sourceCodeStart":697,"sourceCodeEnd":733,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/blueprint_catalog.py#L697-L733","documentation":"BlueprintFillError: the schedule template has a {dow} placeholder, a `recurrence` value was provided, and it is not a key in WEEKDAY_PRESETS after lowercasing. The message lists the valid presets so the caller can re-ask with the allowed vocabulary.","triggerScenarios":"fill_blueprint with values containing recurrence='biweekly' or recurrence='Mon-Fri' (any string not in WEEKDAY_PRESETS), on a template containing '{dow}'.","commonSituations":"Agent-translated natural language ('every weekday') into a preset name that doesn't exist; user free-typed a recurrence the form never offered.","solutions":["Use one of the presets named in the error message (e.g. 'everyday', 'weekdays', 'weekends' — the exact keys of WEEKDAY_PRESETS)","For arbitrary day sets, pass `day` (single day name) or a free-text `schedule` instead of `recurrence`"],"exampleFix":"# before\nfill_blueprint(bp, {\"time\": \"08:00\", \"recurrence\": \"every weekday\"})\n# BlueprintFillError: unknown recurrence 'every weekday' — one of ...\n\n# after\nfill_blueprint(bp, {\"time\": \"08:00\", \"recurrence\": \"weekdays\"})","handlingStrategy":"validation","validationCode":"from cron.blueprint_catalog import WEEKDAY_PRESETS\n\ndef valid_recurrence(r: str) -> bool:\n    return r.lower() in WEEKDAY_PRESETS","typeGuard":null,"tryCatchPattern":"try:\n    spec = fill_blueprint(bp, values)\nexcept BlueprintFillError as e:\n    if str(e).startswith(\"unknown recurrence\"):\n        values[\"recurrence\"] = pick_from(WEEKDAY_PRESETS)\n        spec = fill_blueprint(bp, values)\n    else:\n        raise","preventionTips":["Present WEEKDAY_PRESETS keys as a dropdown, never a free-text field","Lowercase user input before comparing (the check lowercases but does not fuzzy-match)","For patterns outside the presets, fall back to a full `schedule` string"],"tags":["cron","blueprint","validation","scheduling"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}