HTTP and Slack: Cron Job Heartbeat Dead-Man Switch Template
A scheduled Spojit workflow checks a heartbeat URL your background jobs ping, and alerts Slack when no recent heartbeat is found, catching silently failed cron jobs.
What It Builds
A Schedule trigger fires on a fixed cadence. A Connector node in Direct mode uses the built-in http connector to read a heartbeat status URL that your jobs update each time they run. A Condition node compares the last heartbeat timestamp against your freshness window, and when it is stale, a Connector node posts a message to your Slack channel so a missed run never goes unnoticed.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every 15 minutes, fetches the last-heartbeat timestamp from my status URL https://status.example.com/heartbeat, and if the most recent heartbeat is older than 30 minutes, posts an alert to the #ops Slack channel naming the job and how long it has been silent.
Connectors Used
- Schedule trigger - runs the check on a fixed cadence using a cron expression and timezone.
- http - reads the heartbeat status URL your jobs ping.
- Slack - posts the dead-man-switch alert to your chosen channel.
Customize It
Change the schedule cadence, the heartbeat URL, the staleness window (for example 30 minutes to 2 hours), and the target Slack channel directly in the prompt. You can also have Miraxa monitor several heartbeat URLs and name each job in the alert.
Tips
- Run the check more often than your expected ping interval so a single miss is caught quickly.
- Use a Connector node in Direct mode for the Slack post to keep the run fast and AI-free.
- If your status endpoint needs a token, add it as a header on the http connector.