Skip to content
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:

TERMINAL
mkdir my-schedule
cd my-schedule
npm init -y
npm install @fungi.computer/almanac effect@4.0.2
node node_modules/@fungi.computer/almanac/examples/next-occurrence.mjs

It 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:

quickstart.ts
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());