−50%

50% off your first month on any paid plan · code WELCOME50 · until Nov 30

Start free →
Integration Incident management

How to connect PagerDuty to cron job and uptime monitoring

· Setup · 2 minutes

Page whoever is on call when a check fails. WatchCron triggers a PagerDuty incident and resolves it when the check recovers, with one dedup key per monitor.

How it works#

WatchCron sends events through PagerDuty's Events API v2. When a monitor fails, WatchCron triggers an incident on the service you configure. When the monitor recovers, WatchCron sends a resolve event with the same dedup key, and PagerDuty closes the incident automatically. No manual cleanup.

One dedup key per monitor means a flapping check doesn't open ten incidents. Repeat failures update the existing one until recovery comes through.

Before you start#

You need:

  • A PagerDuty account with permission to add integrations to a service.
  • A WatchCron account on any plan. PagerDuty alerts work on Free, Starter, Pro and Business.

If you don't have a PagerDuty service yet, create one first. Most teams use one service per environment (production, staging) or per team.

Step 1 — Get an integration key in PagerDuty#

Open Services → Service Directory and pick the service where incidents should land (or create a new one).

Go to the Integrations tab, click Add an integration, and choose Events API V2. After adding it, expand the integration row and copy the Integration Key. It's a 32-character hex string.

WhereWhat to do
Services → Service DirectoryOpen (or create) the target service
Integrations tabAdd an integration → Events API V2
Integration rowExpand it, copy the Integration Key

Pick Events API V2, not V1. The older version doesn't support resolve events with a dedup key, so auto-recovery won't work.

Step 2 — Add the channel in WatchCron#

Go to Alerts → Channels → Add channel and choose PagerDuty.

FieldWhat to enter
LabelSomething recognisable, e.g. "Production"
Integration (routing) keyThe 32-character key from PagerDuty

Click Save.

Step 3 — Test and assign monitors#

Click Send test. PagerDuty should create a test incident on the service. Check the PagerDuty dashboard to confirm it arrived, then resolve it manually.

Open any monitor and tick the PagerDuty channel under Alert channels. From now on, failures trigger real incidents routed through your escalation policy.

What to paste where#

WatchCron fieldValueWhere you find it
Integration (routing) keyR0123456789abcdef0123456789abcdefService → Integrations → Events API V2

What WatchCron sends#

Two event types:

  • Trigger: when a monitor goes down or misses a heartbeat. Includes the monitor name, reason, and a link to the WatchCron incident page.
  • Resolve: when the monitor recovers. Uses the same dedup key, so PagerDuty closes the matching incident.

Your on-call rotation, escalation rules, and notification preferences all apply as usual. WatchCron just fires the event; PagerDuty handles who gets paged and how.

Troubleshooting#

Yes. Recovery sends a resolve event with the same dedup key, so the incident closes on its own. No manual intervention needed.

Events API V2. The older V1 and email integrations don't support resolve events with a dedup key, which means incidents stay open after recovery.

No. One dedup key per monitor means repeat failures update the existing open incident instead of creating new ones.
Written by Vitalii Holben

Founder of WatchCron. Full-stack developer building monitoring tools that help teams keep cron jobs, uptime, and SSL certificates under control. Based in Europe, shipping code since 2014.

Start monitoring in under 2 minutes.

Free plan includes 20 checks · No credit card required
Pricing Docs
Log in Start free →