$crond.io
integrations / discord

Discord Alerts for Cron Jobs

Drop cron failure alerts into a Discord channel via a server webhook. Two-minute setup, no bot install required.

1. Create the Discord webhook

  1. In Discord, open Channel Settings on the channel you want alerts in (gear icon next to channel name, server admin required).
  2. Go to Integrations → Webhooks → New Webhook.
  3. Name it (e.g., crond.io), optionally upload an avatar.
  4. Click Copy Webhook URL — looks like https://discord.com/api/webhooks/{channel_id}/{token}

2. Wire it up in crond.io

curl -X POST https://api.crond.io/api/v1/monitors/$MONITOR_ID/alerts \
-H "Authorization: Bearer $CROND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "webhook",
"url": "https://discord.com/api/webhooks/.../...",
"payload_template": "discord"
}'

The discord payload template formats alerts as Discord embeds — colored sidebar based on severity (red for down, yellow for late, green for recovered), monitor name as title, status fields, and a clickable link back to the monitor detail page.

Role mentions

To page a specific role on critical alerts, add the role ID to the channel config:

"mention": "<@&1234567890>"

Get the role ID by enabling Discord's Developer Mode and right-clicking the role. The mention only fires for severity down by default — adjust with mention_on: ["down", "late"].

Per-channel routing

Discord webhooks are bound to a single channel at creation. To route different monitors to different channels (e.g., #cron-alerts for routine, #incidents for critical), create one webhook per channel and assign each monitor to the appropriate one.

Limitations

  • No on-call rotation:Discord doesn't have native on-call concepts. For paging that wakes someone up, pair Discord with PagerDutyor use Discord's mobile push reliably.
  • Rate limits: Discord throttles webhooks at ~30 messages per minute per channel. Bursty failures during a major outage will queue.
  • Webhook revocation: if a server admin deletes the webhook in Discord, crond.io has no way to detect it. Periodically test by manually triggering an alert.