A reliability-first checklist for OpenClaw cron workers and any unattended automation.
NO_REPLY conventionMany OpenClaw setups treat emitting exactly NO_REPLY as "silent success" (no human notification).
NO_REPLY, interpret it as: print nothing on success.1) Scripts-first: move logic into a repo script (recommended: tools/ or tools/).
2) One command in cron: cron should run one short command (no multi-line bash -lc '...').
3) Deterministic cwd/env: cd to the repo (or have the script do it), and document required env vars.
4) Silent on success: print nothing (or exactly NO_REPLY) when OK; only emit a short alert when broken.
Also see:
references/cron-agent-contract.mdreferences/pitfalls.mdCron failures are rarely "logic bugs". In practice they're often:
bash -lc '...' nested quotes)$(...))python -c "...")pipefail + head / SIGPIPE)The fix is boring but effective: scripts-first + deterministic execution + silent-on-success.
Even on POSIX, do not hardcode deployment-specific absolute paths tied to one machine.
Prefer:
cd into the repounexpected EOF while looking for matching ')'Likely causes:
$(...) from command substitutionbash -lc ' ... 'Fix pattern:
python3 tools/.py pipefail + head (SIGPIPE)Symptom:
Fix pattern:
pipefail when piping into headCommon causes:
Fix pattern:
cd into the repo (or have the script do it)git push rejected (non-fast-forward)Symptom:
! [rejected] ... (non-fast-forward) when automation pushes to a long-lived PR/feature branch.Conservative fix (no force-push):
Use this near the top of a cron prompt (2 lines, low-noise):
references/cron-agent-contract.md (scripts-first, deterministic cwd, silent-on-success).cron-worker-guardrails skill. If parsing/multi-step logic is needed, write/run a small tools/*.py script.共 1 个版本