Skip to main content

Cron Jobs

Cron and scheduled tasks fail silently more often than teams expect. Seiri watches for the check-in, not the host’s uptime.


Where this lives in the product

  1. Create the monitor under Core → Webhooks with type Cron (or Periodic for fixed intervals).
  2. Copy the endpoint URL from the ENDPOINT column.
  3. Review schedule adherence under Services → Cron Jobs and per-webhook stats.

Monitoring pattern

  1. Run the job.
  2. On success, GET/POST https://ping.seiri.app/webhook/<endpoint-id>/success.
  3. On failure, GET/POST .../fail (optional but recommended).
  4. Keep the ping timeout short and swallow ping errors so monitoring never takes down the job.

<endpoint-id> is the webhook endpoint ID (org-slug:webhook-ref), not a random token.


Example (Node.js)

import fetch from "node-fetch";

const SEIRI_BASE = process.env.SEIRI_BASE_URL;
// e.g. https://ping.seiri.app/webhook/acme-demo:deno-xFY-7Yv

async function scheduledTask() {
// Task logic ...
await fetch(`${SEIRI_BASE}/success`, { method: "GET" });
}

scheduledTask();

Example (crontab)

0 2 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 https://ping.seiri.app/webhook/acme-demo:YOUR_REF/success || curl -fsS -m 10 https://ping.seiri.app/webhook/acme-demo:YOUR_REF/fail

See also: Integrate a job.