Skip to main content
Version: Next

Scheduled housekeeping

Auto mode makes recurring, unattended health checks practical — a nightly housekeeping run that emails you the report:

17 6 * * * cd /path/to/hostwarden && flock -n \
/tmp/hostwarden-cron-server1.lock timeout 30m \
/abs/path/to/claude --permission-mode auto \
-p "Run housekeeping on server1.example.com and \
email me the report" >> ~/hostwarden-cron.log 2>&1

A scheduled run writes nothing over SSH until your servers are named under autoMode in ~/.claude/settings.json; see Auto mode.

This runs on your workstation, with your own keys, and every call runs in BatchMode: a key whose agent confirms each use cannot answer with nobody at the keyboard, and a key without a passphrase belongs only on an operations host (SSH keys). An always-on machine that should do it for the whole fleet while the workstation sleeps is an operations host instead, with its own least-privilege access (An operations host). Fleet read is the one part of Hostwarden's access control the host enforces; a read-only list a session is asked to follow is no substitute for it on a machine nobody watches (Which protection for which need).

Two rules: run the exact prompt interactively once first, so the email recipient, sending path, and other one-time questions are answered and stored in memory (unattended runs can't answer pickers) — and never use --dangerously-skip-permissions in cron. Details, systemd-timer variant, and cron pitfalls: .agents/skills/hostwarden-housekeeping/references/scheduled.md.