npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@concile/scheduler

v0.1.5

Published

Durable scheduled functions for concile: run a mutation or action later, at an exact time, or on a recurring cron cadence — stored as rows in your database, dispatched by a background driver that survives restarts.

Downloads

94

Readme

@concile/scheduler

Durable scheduled functions for concile: run a mutation or action later, at an exact time, or on a recurring cron cadence — stored as rows in your database, dispatched by a background driver that survives restarts.

Install

bun add @concile/scheduler

Enable

Components are opt-in per project. Compose the scheduler in concile.config.ts:

// concile.config.ts
import { defineConfig } from "@concile/component";
import { defineScheduler } from "@concile/scheduler";

export default defineConfig({
  components: [defineScheduler()],
});

To add recurring jobs, declare them with cronJobs() (typically in concile/crons.ts) and pass the registry via defineScheduler({ crons }):

const crons = cronJobs();
crons.interval("cleanup", { minutes: 5 }, "maintenance:_purge", {});
crons.cron("nightly", "0 3 * * *", "reports:_build", {}, { tz: "America/New_York" });

Usage

Once composed, ctx.scheduler is available in every mutation (and, via a delegating facade, every action):

export const notifyLater = mutation({
  handler: async (ctx, { userId }) => {
    const jobId = await ctx.scheduler.runAfter(60_000, "reminders:_send", { userId });
    // or: await ctx.scheduler.runAt(new Date("2026-08-01T09:00:00Z"), "reminders:_send", { userId });
    // later: await ctx.scheduler.cancel(jobId);
    return jobId;
  },
});

Features

  • ctx.scheduler.runAfter(delayMs, fnRef, args) and runAt(ts, fnRef, args) — schedule a mutation or action; the job row is written in the calling mutation's own transaction, so the schedule commits or rolls back atomically with your write.
  • ctx.scheduler.cancel(id) — cancel a pending job, with cascading cancel of child jobs.
  • cronJobs() recurring schedules: .interval(), .cron() (with time zones), .daily(), .hourly(), .weekly(), .monthly(), reconciled into the crons table at boot, with configurable catch-up policies for missed occurrences.
  • Retries with exponential backoff; mutations default to 4 attempts, actions to 1 (at-most-once unless you opt in via retry: { maxFailures }). Crash-looping jobs are dead-lettered, not re-dispatched forever.
  • Lower-level enqueue(fnRef, args, opts) with idempotencyKey, onComplete callbacks, and an opaque context value round-tripped to the callback — the primitive other components build on.
  • A reactive driver: dispatch wakes on every commit plus a wall-clock timer armed to the earliest pending job. No polling loops, no lost work across restarts.
  • Jobs are ordinary rows (scheduler/jobs, scheduler/crons) — browsable in the dashboard like any other table.

No dependencies on other components; it is the base layer @concile/workflow, @concile/triggers, and @concile/notifications build on.

Part of Concile — docs at https://concile-six.vercel.app/docs

License: FSL-1.1-Apache-2.0