Cron Platform
Guides

Notifications

Get alerted when jobs succeed, fail, or complete via webhook, email, Slack, or Discord.

TrigRun can notify you when job executions succeed, fail, or complete. Notifications are configured in two steps: create a channel (where to send), then attach a rule to a job (when to send).

Channel types

TypeConfigDescription
webhookurl, optional secretPOST to any URL. Optional HMAC signing.
emailemailSend to an email address
slackurlPOST to a Slack incoming webhook URL
discordurlPOST to a Discord webhook URL

Creating a channel

Webhook with signing secret:

curl -X POST https://api.trigrun.com/v1/notification-channels \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ops-webhook",
    "type": "webhook",
    "config": {
      "url": "https://api.example.com/hooks/cron",
      "secret": "whsec_your_signing_secret"
    }
  }'

Slack:

curl -X POST https://api.trigrun.com/v1/notification-channels \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "slack-alerts",
    "type": "slack",
    "config": {
      "url": "https://hooks.slack.com/services/T00/B00/xxx"
    }
  }'

Email:

curl -X POST https://api.trigrun.com/v1/notification-channels \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "team-email",
    "type": "email",
    "config": {
      "email": "[email protected]"
    }
  }'

Notification events

EventFires when
on_successAn execution completes with a success status
on_failureAn execution exhausts all retry attempts and fails
on_completionAn execution finishes, regardless of outcome

Attaching rules to jobs

A rule connects a channel to a job for a specific event:

curl -X POST https://api.trigrun.com/v1/jobs/JOB_ID/notification-rules \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "CHANNEL_ID",
    "event": "on_failure"
  }'

You can attach multiple rules to the same job — for example, send failures to Slack and all completions to a webhook.

Listing rules for a job

curl https://api.trigrun.com/v1/jobs/JOB_ID/notification-rules \
  -H "Authorization: Bearer $TOKEN"
{
  "items": [
    {
      "id": "clx...",
      "job_id": "clx...",
      "channel_id": "clx...",
      "channel_name": "slack-alerts",
      "channel_type": "slack",
      "event": "on_failure"
    }
  ]
}

Removing a rule

curl -X DELETE https://api.trigrun.com/v1/jobs/JOB_ID/notification-rules/RULE_ID \
  -H "Authorization: Bearer $TOKEN"

Delivery tracking

Every notification sent is tracked as a delivery. You can list deliveries and retry failed ones.

List all deliveries:

curl "https://api.trigrun.com/v1/notification-deliveries?status=failed" \
  -H "Authorization: Bearer $TOKEN"

List deliveries for a specific execution:

curl "https://api.trigrun.com/v1/executions/EXECUTION_ID/notifications" \
  -H "Authorization: Bearer $TOKEN"

Retry a failed delivery:

curl -X POST https://api.trigrun.com/v1/notification-deliveries/DELIVERY_ID/retry \
  -H "Authorization: Bearer $TOKEN"

Delivery statuses

StatusMeaning
pendingQueued, waiting to be sent
processingCurrently being sent
sentSuccessfully delivered
failedAll delivery attempts exhausted

CLI reference

# Channels
cronctl channels list
cronctl channels create --name ops --type webhook --url https://example.com/hook
cronctl channels create --name alerts --type email --email [email protected]
cronctl channels delete CHANNEL_ID

# Rules
cronctl rules list JOB_ID
cronctl rules add JOB_ID --channel CHANNEL_ID --event on_failure
cronctl rules remove JOB_ID RULE_ID

# Deliveries
cronctl deliveries list
cronctl deliveries list --status failed
cronctl deliveries retry DELIVERY_ID

On this page