spooky particles

Monitor AI agent scheduled jobs

Give each scheduled agent job a Spooky check-in link to call when it runs. If the job stays silent past its grace period, Spooky alerts you by email and tells your coding agent. Phone alerts need an ntfy channel; email is the default.

How do I know when an AI agent's scheduled job did not run?

A check-in records each completed run. Spooky compares that record with the job's expected period or cron schedule. If no check-in arrives by the expected time plus its grace period, the job is late or down and an alert goes to you and your coding agent.

A note posted with a ping is kept as that run's note. With no alert channel set, it goes to your account email. Add an ntfy topic when you also want phone alerts.

How do I set it up?

  1. Follow the agent quickstart to set up a key. Creating a job needs a write key. POST to /api/v1/checkins with periodMinutes and graceMinutes, or use a cron schedule and timeZone. The REST API guide shows the safe header pattern.
  2. Take the ping curl line returned by the create call and add it at the end of the agent's script, after the script's own success check. The ping is one GET and needs no API key.
  3. When the script fails, POST a short note to the ping link with ?status=fail. Spooky keeps the first 2,000 characters of the note with that run.

Treat the ping link like a password. Anyone with it can report a run.

Copy this prompt into your agent

text
Create a Spooky check-in for this scheduled agent job. Read SPOOKY_API_KEY from the environment and create it with POST https://spookyparticles.com/api/v1/checkins, using the stdin header pattern from https://spookyparticles.com/docs/api. Never print the key or put it on a command line. Add the returned ping curl line to the end of the job, after its own success check. Report the ping link only as "saved". Never print the link.

What else catches a job that starts and never finishes?

Set maxRunMinutes when creating the check-in, then send ?status=start before the work begins. If no finishing ping arrives within that limit, Spooky catches the unfinished run.

Set minCount when a run must process a minimum number of items. Send ?count=N with the successful ping, and Spooky flags a count below the minimum. A missing count does not fail the run. The check-ins guide has the exact start, failure and count forms.

A fair note on alternatives

Generic cron monitors also work for scheduled jobs that are not on Vercel. Compare the two ways a monitor can learn about a run in the cron job monitoring tool guide.

Return to Spooky Particles