Scheduled checks

Automatic drift checks on a schedule — daily full, hourly quick, and a weekly digest.

On a paid plan, ParityRail checks for drift on a schedule so you don’t have to press a button: a full daily sweep, a light hourly pass, and a weekly recap.

Before you start

  • A paid ParityRail plan that includes scheduled checks — the Free plan is manual-only and cron skips its projects. See plans & quotas.
  • The project has finished onboarding — only eligible, onboarded projects are scanned.
  • A Vercel deployment with the cron jobs declared in vercel.json — this is repo configuration, not something you toggle in ParityRail.
  • A CRON_SECRET environment variable set in the deployment before going live.

Turn it on

There’s no onboarding-wizard step or in-app toggle for scheduled checks — they run automatically for eligible projects. What follows is deployment configuration, not wizard clicks.
  1. In your Vercel project settings, add an environment variable CRON_SECRET with a strong random value:
    CRON_SECRET=<strong-random-value>
  2. Make sure vercel.json declares the three cron paths:
    /api/cron/reconcile     0 3 * * *
    /api/cron/recent        0 * * * *
    /api/cron/weekly-digest 0 8 * * 1
  3. Deploy. Vercel Cron then calls each endpoint on schedule, sending:
    Authorization: Bearer $CRON_SECRET
  4. Confirm the project is on a scheduled-checks plan and has completed onboarding, so it’s eligible.
  5. For the weekly digest to actually send, enable at least one notification channel (Slack or email) on the project.
Set CRON_SECRET before you go live. In production, a request with a missing or wrong secret gets 401. If no secret is set at all, the endpoints refuse to run.

What each schedule does

CheckRunsWhat it covers
Daily full check
/api/cron/reconcile
Daily, 03:00 UTCFull all-customers reconciliation for every onboarded project on a scheduled-checks plan.
Hourly quick check
/api/cron/recent
Hourly, on the hourRecent-scope reconciliation: only recently-changed customers plus any subject with an open incident.
Weekly digest
/api/cron/weekly-digest
Mondays, 08:00 UTCSend the weekly digest to each alert-enabled project's notification channels.

Daily full check

Once a day, ParityRail checks every customer in each eligible project (/api/cron/reconcile). It’s the same check as a manual full scan — every customer is compared and every access incident refreshed.

Because it checks everyone, it’s metered against your scan quota and skipped once a workspace is over its limit.

Hourly quick check

Every hour, ParityRail re-checks only what plausibly changed — capped per run to stay fast — instead of scanning everyone (/api/cron/recent). It looks at:

  • Customers whose Stripe state changed in roughly the last 90 minutes.
  • Every customer that still has an open access incident, so unresolved drift keeps getting retried until it clears.

If there’s nothing recent and nothing open, the run finishes immediately without spending credits.

Weekly digest

Every Monday, ParityRail sends a 7-day recap to each alert-enabled project’s Slack and email channels (/api/cron/weekly-digest).

Think of it as your “monitoring is working” heartbeat. It lands even when everything’s healthy, so a quiet week still gets a reassuring all-clear. The digest covers:

  • Open access incidents, broken down by severity, and the revenue at risk.
  • Incidents cleared in the window (repaired vs. resolved) and the revenue protected.
  • How many fulfillment checks ran.

A project only receives the digest if it’s on an alerts-enabled plan and has at least one enabled notification channel — with no channels there’s nothing to send.

Verify it worked

There’s no onboarding-UI signal that scheduled checks are “on.” Confirm indirectly, after the next scheduled window:

  • New fulfillment-check runs appear in the project’s run history / incident inbox. The daily full sweep refreshes every customer; the hourly quick check only touches recently-changed customers plus any subject with an open incident, and finishes immediately if there’s nothing to do.
  • The weekly digest lands in the project’s enabled Slack/email channels every Monday — even on a healthy week, as an all-clear heartbeat.

Troubleshooting

SymptomFix
Endpoints return 401CRON_SECRET is missing or the bearer token doesn't match. Set CRON_SECRET in the deployment — in production a missing/wrong secret gets 401, and if no secret is set at all the endpoints refuse to run.
No scheduled runs appearThe project is on the Free plan (manual-only, skipped), hasn't finished onboarding, or the workspace is over its scan quota — the daily full check is metered and skipped once over the limit.
Timing looks off by hoursAll schedules run in UTC, not local time.
Weekly digest never arrivesThe project must be on an alerts-enabled plan AND have at least one enabled notification channel — with no channels there's nothing to send.
Hourly check seems to do nothingExpected, if nothing changed in roughly the last 90 minutes and no incident is open — the recent run finishes immediately without spending credits.