← All guides

Guide · AI

Add monitoring with AI, in one prompt.

Let ChatGPT, Claude, Cursor or Copilot wire a Mortemain check-in into any cron job, script or workflow. Paste the prompt, drop your job underneath, and it hands you the edited version, no SDK, no boilerplate.

1. Copy the prompt

This is the whole trick. It tells the assistant exactly what a Mortemain check-in is and how to add it without over-engineering.

AI prompt
Add a Mortemain check-in to the job below so I get alerted if it ever silently stops. On success, make one HTTP request to https://ping.mortemain.com/PASTE-YOUR-CHECK-UUID; on failure, request that same URL with /fail on the end. Keep it minimal, no SDK, use curl / PowerShell / whatever fits my code, then show me the changed version.

[ paste your cron line, script, or job here ]

2. Paste your job and your ping URL

Create a check in your dashboard and copy its unique ping URL (https://ping.mortemain.com/your-check-uuid). Replace the placeholder, drop your cron line or script in, and send. The assistant returns your job with the check-in wired in.

3. Ask for variations

The same idea covers most of what people ask an AI to do here. A few ready lines:

AI, add a webhook
Add a webhook call to the end of this job that requests https://ping.mortemain.com/PASTE-YOUR-CHECK-UUID on success and the same URL with /fail on error. One request, no library.
AI, modify my script
Modify this script so it pings https://ping.mortemain.com/PASTE-YOUR-CHECK-UUID/start when it begins, the base URL on success, and /fail in an error handler. Keep my logic untouched and show a diff.

Works with your assistant

The prompt is plain English and assistant-agnostic. It works the same in ChatGPT, Claude, Cursor, GitHub Copilot, Gemini, Grok, Perplexity, Mistral LeChat and most coding assistants. In an editor like Cursor it can apply the edit to your file directly; in a chat window it returns the changed code to paste back.

Why this works

A Mortemain check is a dead man's switch: your job is supposed to check in on a schedule, and if a check-in is ever late, Mortemain alerts you. There is nothing to install, so an AI only has to add one line, an HTTP request to your ping URL. That is why "AI, add cron monitoring" is a one-shot task and not an integration project.

Verify it

Run the job (or the curl the assistant added) once by hand. Your check should flip to up within a second or two. Prefer to wire it in yourself? Every manual recipe is in the guides, from shell & cron to PowerShell and plain webhooks.