Skip to content

Let Claude Code add monitoring to your jobs

When Claude Code writes a scheduled job, it can also create the Pingstack check that watches it. Connected over MCP, Claude reads your job’s schedule, creates a heartbeat check to match, and adds a success-only report step that reads the ping URL from a secret you set yourself.

By the end of this recipe Claude Code will be connected to your Pingstack account, one of your jobs will have a matching check, and your project can ask Claude to do the same for every new job.

Add the Pingstack server and sign in through your browser:

Terminal window
claude mcp add --transport http pingstack https://pingstack.io/mcp

Inside Claude Code, run /mcp, choose pingstack and authenticate. An Owner or Admin approves the connection and its permissions. The connection needs permission to create checks. Leave heartbeat URL access off, as it is by default: Claude doesn’t need to read ping URLs for this recipe. See browser sign-in for details.

Confirm the connection with a read-only request:

Read my Pingstack account capabilities and list my checks. Don’t change anything.

Claude should name the account you approved. If it names a different one, disconnect it in Pingstack settings and connect again.

Point Claude at a job in your project:

Look at the nightly export job in .github/workflows/export.yml. Propose a Pingstack heartbeat check that matches its schedule and timezone, with a grace period that covers its runtime. Show me the configuration before you create it.

Claude reads the schedule and proposes a check: a cron expression, a timezone, a grace period and a name. Review it, then confirm. Claude creates it with create_check, and can attach it to a dashboard or a notification group if you ask and your role allows it.

Then ask for the report step:

Add a step that reports success to Pingstack only after the export succeeds, reading the URL from a PINGSTACK_PING_URL secret. Don’t put the URL in the repository.

Claude edits the job using the pattern for your scheduler, such as the GitHub Actions, crontab, Kubernetes or Laravel recipe.

Open the new check in Pingstack, copy the location’s ping URL, and store it in your job’s secret store as PINGSTACK_PING_URL. Do this yourself rather than pasting the URL into the conversation: anyone who has it can report a run, and a chat transcript isn’t a secret store.

Run the job once, by hand or by triggering it in your scheduler, then ask:

Has the nightly export check received a heartbeat? What’s its next deadline?

Claude reads the check with get_check and tells you whether the location is up. A location that has never reported stays pending.

Add an instruction to your project’s CLAUDE.md so Claude does this whenever it adds a scheduled job:

## Monitoring
When you add or change a scheduled job (cron, GitHub Actions schedule,
Kubernetes CronJob, Laravel scheduler task), propose a matching Pingstack
heartbeat check, show it to me before creating it, and add a success-only
report step that reads its URL from a secret. Never ask me to paste a ping
URL into chat.

Claude works within your role’s permissions and your plan’s limits. It can’t delete checks, publish a dashboard, change your plan or buy anything. If you’ve reached your plan’s check limit, create_check fails and Claude should tell you so, with the upgrade link Pingstack returns, for a person to open. See the tool reference and safe assistant workflows.

  • No Pingstack tools in Claude Code. Run /mcp and check that pingstack is connected and authenticated.
  • Create fails with a scope or role error. Your role or the approved permissions don’t allow creating checks. Ask an Owner or Admin.
  • The check stays pending. The report step hasn’t run successfully yet, or the secret is missing or misnamed.

See MCP troubleshooting for connection problems.