Quickstart
Quickstart
Target-agnostic durable schedule core: cron cadence, occurrence identity, missed-tick and retry policy
Use Node 24 or later. Install the package and run its shipped example:
mkdir my-schedulecd my-schedulenpm init -ynpm install @fungi.computer/almanac effect@4.0.2node node_modules/@fungi.computer/almanac/examples/next-occurrence.mjsIt prints 2026-10-11T09:00:00.000Z. During release qualification, install the
supplied Almanac .tgz instead of the package name. Publication is a separate
step.
The example uses the root export:
import { nextOccurrence } from "@fungi.computer/almanac";import * as Result from "effect/Result";
const next = nextOccurrence( { expression: "0 9 * * *", timeZone: "UTC" }, Date.parse("2026-10-11T08:00:00Z"),);if (Result.isFailure(next)) throw new Error(next.failure.message);console.log(new Date(next.success).toISOString());