Monitoring scheduled Claude Code and other agent routines
Updated 5 November 2026.
Running an agent from cron or a timer (a coding agent in headless mode, a research script, a nightly "check my inbox and draft replies" routine) is great until the night it doesn't run, or runs and does nothing. Three signals cover it.
1. Did it start and finish?
Wrap the command. The wrapper sends a start signal, runs it, then reports the exit code and the last few KB of output:
curl -fsSL https://cronpup.com/install.sh | sh
30 2 * * * cronpup run YOUR-UUID -- /opt/agents/nightly.sh
Set the monitor's grace to a bit more than the longest normal run. A run that is still going after that (waiting on a prompt, looping) alerts as "started but didn't finish".
2. Run it non-interactively
A scheduled agent must never stop to ask. Use your agent's non-interactive mode and give it the permissions it needs up front (check its docs for the exact flags); anything it would have asked about should make it fail with a non-zero exit code, which turns into an immediate alert with the reason.
3. Did it do anything?
Exit code 0 doesn't mean useful work. Add a progress check after the run: for example, only ping a second monitor if the agent produced its output (a commit, a report file, a non-empty summary):
test -s /var/agents/report-$(date +\%F).md && curl -fsS -m 10 https://cronpup.com/p/PROGRESS-UUID
That second monitor going quiet means "it ran, but produced nothing", the failure no exit code shows.
Let the agent wire it up
Tell your coding agent https://cronpup.com/ onboard my nightly agent routine: it reads
/llms.txt, proposes the monitors and sends you an approval link.
More patterns on the AI agents use-case page.
Start free.