Monitoring AI agents and scheduled routines
Updated 5 November 2026.
A scheduled agent (a nightly coding agent, a research routine, a support triage bot, an n8n workflow with an LLM step) is a cron job with more ways to fail. Most of them are silent: nothing crashes, nothing is "down", and you find out days later that the work didn't happen. A heartbeat monitor turns that silence into an alert.
How agents fail, and what catches it
| What happens | What you see without monitoring | What catches it |
|---|---|---|
| It "succeeds" without doing anything (empty input, a tool quietly refused, it decided there was nothing to do) | Exit code 0, green CI | Ping only when real work was done (a progress ping), not just when the process exits |
| It waits forever on a permission or confirmation prompt | The process is alive and idle | A start ping plus a grace period: started but never finished alerts |
| Out of credits, rate limited, an API key expired | An error in a log nobody reads | Report the exit code (/$?) or /fail: it alerts at once, with the last output |
| It loops, or runs far longer than usual | A growing bill | Start/finish pings: run durations are recorded, and a run that doesn't finish within the grace alerts |
| The schedule itself stopped (machine off, cron line lost, workflow disabled) | Nothing at all | Any heartbeat: no ping by the deadline alerts |
Two monitors per agent: alive and making progress
This is how CronPup's own operator watches the AI agent that runs CronPup. One monitor is pinged while the agent's session is alive. A second is pinged only when the agent has actually made progress since the last ping (new commits, a new log entry, a finished task). A stuck agent keeps the first one green and lets the second one go quiet, and that's the alert you want: the agent is running, but it isn't doing anything.
# every 10 minutes: alive
*/10 * * * * pgrep -f my-agent >/dev/null && curl -fsS -m 10 https://cronpup.com/p/ALIVE-UUID
# every 10 minutes: progress (only if the work log grew since last time)
*/10 * * * * /usr/local/bin/progress-check.sh && curl -fsS -m 10 https://cronpup.com/p/PROGRESS-UUID
A scheduled routine: start, exit code, output
Wrap the run so it sends a start signal and then the exit code with the end of the output. A run that hangs alerts after the grace period; a failing run alerts at once with the error text in the alert.
curl -fsSL https://cronpup.com/install.sh | sh
0 6 * * * cronpup run YOUR-UUID -- /opt/agents/morning-digest.sh
If the agent itself decides whether a run was useful, have it send the ping (or /fail) as its last step,
with a short summary in the body; the summary is stored with the ping and shown in the alert.
Let the agent set up its own monitoring
Give your coding agent the prompt https://cronpup.com/ onboard <the job>. It reads
our instructions for agents, proposes the monitor, and sends you a link to approve it in the
browser. You never paste your account key into the chat; the agent gets a key that only works for the monitors you
approved, wires the ping into the job and checks that the first ping arrives.
Quiet notifications for runs you just want to know about
Optional low-priority start/stop notifications (for example to the ntfy app) tell you when a long-running agent starts or is paused, separately from the real alerts. Pick per channel, per monitor.
Guides
- Monitoring scheduled Claude Code and other agent routines
- Monitoring AI agents that run in GitHub Actions
- Monitoring n8n and Zapier AI workflows
CronPup doesn't read your prompts or model output beyond the up-to-10 KB body you choose to send with a ping. We don't track tokens or costs per run; tell us if you need that.