{"data":{"kind":"file","path":"README.md","version_id":"n92lil9fxk5r7szo59y7wul4","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":3707,"modified_at":"2026-11-30T15:03:16.526000","content_hash":"afbfee4f126e1a7dabad94412034cb3ac58fe03da66654f7f71c192fa5b7dcbb"},"entries":[],"content":"# cron-from-english\n\nTranslate a schedule written in plain English into a standard 5-field **cron expression**. The answer is graded by **exact fire-time equivalence**, not string matching.\n\n| | |\n|---|---|\n| Type | single-turn, answer-only (defaults to the tool-less `null` harness) |\n| Tasks | procedurally generated from 23 schedule families, deterministic per `(seed, index)`, 1000 by default |\n| Reward | 1.0 if the expression fires at exactly the same minutes as the reference over 2027–2030, else 0.0 (optional partial credit) |\n| Dependencies | none beyond `verifiers` (the cron engine is pure Python) |\n\n## Example\n\n> **Schedule:** At 9:00 AM on the 1st and the 15th of every month, and also at that time on every Monday (whatever its date).\n\nThe reference is `0 9 1,15 * 1`. `0 9 1,15 * MON` also scores 1.0. `0 9 1,15 * *` scores 0, because it misses the Mondays.\n\n## Grading\n\nThe reply's last `<cron>...</cron>` block is parsed with **Vixie cron / cronie semantics**:\n\n* `*`, values, ranges `a-b`, lists, steps `*/s` and `a-b/s`, `a/s` (= `a-max/s`), month and day names, Sunday as `0` or `7`;\n* macros `@hourly @daily @midnight @weekly @monthly @yearly @annually`;\n* **the day-of-month / day-of-week rule**: if both fields are restricted (neither starts with `*`), a day matches when **either** field matches. So `0 9 1-31 * 1-5` fires every day, not only on weekdays, and the grader scores it that way.\n\nNon-standard syntax (`L`, `W`, `#`, `?`, seconds or year fields, `@reboot`) is rejected as invalid.\n\nTwo expressions are equivalent when they produce the same set of (day, hour, minute) fire times between 2027-01-01 and 2030-12-31, a span that includes the leap year 2028. The comparison is exact and fast: the set is (matching days) × (hours) × (minutes), so it is never enumerated minute by minute. Any correct spelling passes: `*/15` vs `0,15,30,45`, `1-5` vs `MON-FRI`, `*/3` vs `1,4,7,10`.\n\nMetrics logged: `valid_cron`, `equivalent`, `fire_time_jaccard` (the overlap |A∩B| / |A∪B| of the fire-time sets). `trace.info[\"cron_grade\"]` stores the parsed answer, the reference and any parse error.\n\n## Difficulty\n\n| `difficulty` | Families |\n|---|---|\n| `easy` | daily, every N minutes, hourly at minute M, weekly, monthly, yearly |\n| `medium` | weekdays, weekends, business-hours intervals, twice daily, selected months, every N hours, quarterly, several weekdays |\n| `hard` | day-of-month **or** day-of-week unions, short windows on one weekday in one month, odd or even hours, day-of-month ranges, split shifts, seasonal weekly jobs, minute lists in an hour range, every other day of the month, weekdays in chosen months |\n| `mixed` (default) | 30% easy / 40% medium / 30% hard |\n\nEach English template spells out its boundaries (\"from 9:00 AM through 4:45 PM (inclusive)\", \"starting at the top of each hour (:00, :20, :40, ...)\"), so every task has exactly one correct set of fire times. Every generated reference is checked when it is built: it parses, it fires at least once, and it equals itself.\n\n## Usage\n\n```bash\nprime env install <owner>/cron-from-english\nuv run vf-validate cron-from-english -n 5                          # gold check, no model calls\nuv run vf-run cron-from-english -m <model> -n 20 -r 3               # local eval\nuv run vf-run cron-from-english -n 10 -r 3 --env.taskset.difficulty hard\n```\n\nConfig:\n* `--env.taskset.num-tasks` (default 1000)\n* `--env.taskset.seed` (default 0)\n* `--env.taskset.difficulty` (`easy|medium|hard|mixed`)\n* `--env.taskset.task.partial-credit` (default `false`; when `true`, the reward is the fire-time Jaccard overlap instead of 0/1)\n\n## Local tests (no dependencies)\n\n```bash\npython -m unittest discover -s tests -v\n```\n","encoding":"utf-8","truncated":false,"total_bytes":3707},"status":null}