Skip to main content

Getting Started with Crontify

Crontify monitors your scheduled jobs and alerts you the moment one misses, hangs, or fails — before your users notice.

How it works

  1. Create a monitor in your dashboard — set a name, cron schedule, and grace period
  2. Instrument your job with three lines of SDK code
  3. Get alerted via Slack, Discord, email, or webhook the moment something goes wrong

Crontify works by expecting a ping from your job within a time window. If the ping doesn't arrive, or if your job reports a failure, you get notified immediately.

Prerequisites

Quick Start (5 minutes)

Step 1 — Install the SDK

npm install @crontify/sdk

Step 2 — Create a monitor

Log in to your dashboard, go to Monitors, and click New Monitor.

Fill in:

  • Name — e.g. Daily Email Digest
  • Expected Schedule — your cron expression, e.g. 0 9 * * *
  • Grace Period — how many seconds after the expected run time before alerting (e.g. 300 for 5 minutes)
  • Alert Channels — select one or more channels to notify, or create a new one inline

Copy the Monitor ID from the monitor detail page.

Step 3 — Create an API key

Go to API Keys and click New API Key. Copy the key immediately — it's only shown once.

Store it as an environment variable:

CRONTIFY_API_KEY=ck_live_...
CRONTIFY_MONITOR_ID=clxxx...

Step 4 — Instrument your job

import { CrontifyMonitor } from '@crontify/sdk';

const monitor = new CrontifyMonitor({
apiKey: process.env.CRONTIFY_API_KEY!,
monitorId: process.env.CRONTIFY_MONITOR_ID!,
});

async function sendDailyDigest() {
await monitor.wrap(async () => {
// Your existing job logic here
await processEmails();
});
}

That's it. Crontify now tracks every run of your job. If an exception is thrown, wrap() automatically calls fail() and captures the stack trace — no extra code needed.

Step 5 — Set up an alert channel

When you verified your email address, Crontify automatically created a My Email alert channel for you. You can attach it to any monitor immediately.

To add additional channels (Slack, Discord, webhook), go to Alert Channels and click New Channel. You can also create channels directly from the monitor form without leaving the page.

You'll receive an alert if:

  • The job doesn't start within the grace period (missed)
  • The job starts but doesn't finish within the expected time (hung)
  • The job explicitly reports a failure (failed)
  • The job completes but its output matches an alert rule (silent failure)
  • The job runs significantly slower than its historical average (slow)
  • The job recovers after a failure (recovery)

Next steps