# Hermes script-only cron recipe Use this recipe when a local command must run on a schedule and its stdout should be posted without an LLM. ## Wrapper Place a wrapper under `$HERMES_HOME/scripts/`, for example: ```python import subprocess import sys result = subprocess.run( ["python3", "/absolute/path/to/command.py"], capture_output=True, text=True, ) sys.stdout.write(result.stdout) sys.stderr.write(result.stderr) sys.exit(result.returncode) ``` Use the relative filename in the cron call: ```text cronjob_manage( action="create", name="Nightly command", schedule="0 3 * * *", script="nightly_command.py", no_agent=true, deliver="origin" ) ``` ## Verification checklist After creation, list the jobs and check: - `name` and `schedule` match the request; - `enabled` is true and `state` is `scheduled`; - `script` is the relative wrapper filename; - `no_agent` is true; - `deliver` points to the requested channel; - `next_run_at` has the expected timezone offset. Script-only semantics: trimmed stdout is delivered verbatim; empty stdout sends nothing; a non-zero exit or timeout produces an error alert. A script may itself invoke paid models even though the scheduler uses no agent. ## Repair and replay acceptance ladder 1. Read the most recent failure for the exact job before diagnosing; an earlier failure may no longer be the current blocker. 2. Compare the invoked executable and the launch service's `PATH` with the interactive shell, inspecting only relevant environment fields. Run a harmless `--version` probe under that service PATH rather than launching the full worker fleet just to test command resolution. 3. If resolution is the cause, test the discovered absolute executable under the same environment. Prefer a scoped executable-path fix in the wrapper over global PATH edits or service restarts. Do not assume a remembered installation path still exists. 4. Write a regression that exercises the real executable-selection path. A command-capture seam followed by an actual `--version` process can prove resolution without inventing a model response. Watch it fail before changing production code, then rerun it unchanged. 5. Exercise the repaired analysis stage on an existing authorized raw artifact; avoid regenerating all upstream agent responses for a downstream-only test. Save its real response and distinguish successful execution from correctness of its conclusions. 6. For an explicitly requested end-to-end replay, inspect `hermes cron run --help`, invoke `hermes cron run `, and read the exact job back with `hermes cron list`. Require a new completed execution and its corresponding artifact; a queued/triggered response alone is insufficient. Verify that the recurring schedule remains unchanged. 7. Audit collection coverage separately: successful worker replies (including no-work replies), timeouts, startup errors, and genuinely empty output. Do not equate a healthy aggregate process with healthy children, or turn uncommitted files and harmless warnings into critical incidents solely because a model labels them that way. 8. Keep error history intact until a real new execution updates it. Report stage tests, complete replay, analysis-quality findings, and message-delivery verification as separate acceptance levels.