Loop Engineering Without a Coding Agent: The 11 Cron Jobs That Run My Infrastructure
说明与用途
无需 AI 的基础设施自动化:11 个 cron 任务通过脚本和控制检查保持 NAS、服务器和邮件的稳定运行。
问题
Managing self‑hosted infrastructure requires continuous monitoring and automated actions without relying on AI agents, to avoid unnecessary costs and failures.
结果
The author achieved near‑zero token costs for 8 of 11 jobs, maintained reliable monitoring with no false alarms for 1,618 ticks, and reduced manual intervention by automating deterministic checks.
工作流
- 1. Define 11 cron jobs with specific triggers (e.g., every 5 min, daily 10:00).
- 2. Implement each job as a script that performs deterministic checks (HTTP/TCP probes, SMART counters, domain expiry thresholds).
- 3. Add a control probe (e.g., https://one.one.one.one/) to distinguish local failures from network outages.
- 4. Ensure scripts exit with code 0 on success and code 1 with a "CANNOT MEASURE" message on failure.
- 5. For jobs requiring judgment, use an LLM prompt but keep them in Tier 2 (propose, human confirms).
- 6. Deploy Tier 3 job (VM restart) with strict conditions: unreachable from hypervisor, three‑run cooldown, and control probe success.
- 7. Monitor Telegram notifications for alerts only when failures occur.
- 8. Periodically review the first few runs of new jobs to detect silent failures.
证据
Eight of those eleven contain no AI at all.
The measured difference in my own fleet: 8 of 11 loops run with zero tokens.
The endpoint watchdog goes further, and this is my favourite piece of the whole setup. Before it judges anything, it probes a control target — https://one.one.one.one/.
A verifier that cannot tell "broken" from "I can't see" will eventually take a destructive action during a network outage.
- 记录日期: 2026-10-21T05:56:20.058Z