Skip to content
LastPing
Guide for scheduled AI tasks

Monitor Claude scheduled tasks and Claude Code routines

A scheduled task that never runs raises no error and sends no message. Give the task a LastPing monitor on its schedule and two pings in its prompt, and you hear about the run that was missed, failed or never finished.

Your assistant can do this for you

Monitor my scheduled task with LastPing

On this page
  1. The run you never see is the one that matters
  2. Set it up
  3. With the LastPing connector
  4. What cannot be monitored
  5. Questions people ask

The run you never see is the one that matters

When a routine or scheduled task works, you read its output. When it does not run at all (the computer was asleep, a limit was reached, the task was turned off, a permission changed), there is nothing to read and nothing tells you. LastPing waits for the ping each run should send, and opens an incident when it does not arrive in time.

Set it up

Create a monitor on the task's schedule

In the console, create a monitor with the same schedule as the task (a cron expression and time zone, or an interval) and a grace window for how late it may be. Or ask an assistant connected to LastPing to create it. Copy the monitor's ping URL.

Add the pings to the task's instructions

Paste this at the end of the task's prompt, with your ping URL:

At the start of this task, run:
curl -fsS -m 10 --retry 3 https://ping.lastping.dev/<uuid>/start

When the task is done, run:
curl -fsS -m 10 --retry 3 https://ping.lastping.dev/<uuid>

If the task fails or you cannot finish it, run this instead:
curl -fsS -m 10 --retry 3 --data-raw "<one line on what went wrong>" https://ping.lastping.dev/<uuid>/fail

Make sure the task can reach LastPing

The task sends the pings with a shell command, so it must run where Claude has a shell and network access. If the environment limits network access, allow ping.lastping.dev, or every run will look missed.

Set a maximum runtime

With the start ping in place, a maximum runtime on the monitor opens an incident when a run starts and never finishes.

With the LastPing connector

If the task's environment has LastPing connected over MCP, it can look up its own monitor and the exact commands with get_ping_instructions, and an assistant can create the monitor for you after you agree. The ping itself is still a shell command: an MCP tool call does not count as a run.

What cannot be monitored

LastPing cannot watch an ordinary chat. A chat has no schedule, so there is no run that should have happened, and nothing in a chat sends a ping on its own. A task that runs where Claude has no shell or no network cannot send the pings either: monitor the schedule that starts it instead, if there is one.

Questions people ask

  • How do I know if a Claude scheduled task did not run?

    Create a LastPing monitor with the same schedule and add a success ping to the end of the task's prompt. If the ping does not arrive within the grace window, LastPing opens an incident and alerts you by email, Slack, Discord or your phone.

  • Can a Claude Code routine report to LastPing?

    Yes, when the routine can run shell commands and reach ping.lastping.dev. Add the start and finish pings to its instructions. If its environment limits network access, allow ping.lastping.dev.

  • Can LastPing monitor a chat in claude.ai?

    No. A chat has no schedule and sends no pings, so there is nothing to watch. LastPing monitors work that is expected to run: scheduled tasks, routines, agents, cron jobs and CI pipelines.

  • What does the task send when it fails?

    A POST to the monitor's /fail URL with one line on what went wrong. That line is stored on the incident, so the alert says why, not just that the run failed.

Free for individuals

The missed run is the one nobody reports.

One monitor and two pings per task. Free for individuals.