PulseCron

1. Declare a leased schedule

Commit schedules in HCL or call the REST API to register a deterministic cron lease.

pulsecron.hcl
schedule "nightly_ledger_close" {
  cron      = "0 0 * * *"
  timezone  = "America/New_York"
  quorum    = 5
  delivery  = "exactly_once"

  target {
    url     = "https://api.acme.internal/v1/ledger/close"
    timeout = "10s"
    retries = 4
  }
}

2. Verify the Ed25519 signature and lease epoch

Reject out-of-order deliveries in four lines using the monotonic fencing token header.

handler.ts
import { verifyPulseRequest } from "@pulsecron/verify";

export async function POST(request: Request) {
  const lease = await verifyPulseRequest(request, {
    publicKey: process.env.PULSECRON_PUBLIC_KEY!,
  });

  if (await alreadyProcessed(lease.executionId, lease.epoch)) {
    return new Response("already committed", { status: 200 });
  }

  await closeDailyLedger(lease.scheduledAt);
  return Response.json({ committed: lease.executionId });
}

3. Dry-run DST boundaries locally

Preview the next five exact UTC timestamps and verify failover posture before deploying.

Terminal
npx pulsecron plan --file pulsecron.hcl --next 5 --check-dst