🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

aaspai-schedkit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aaspai-schedkit

Universal scheduler & reminders with time zones, natural language, cron, RRULE. Express/Nest adapters + Mongo storage.

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

schedkit-universal

Scheduling & Reminders you can reuse anywhere (NestJS, Express, any Node app). Supports:

  • Time zones (IANA via Luxon)
  • Natural language (tomorrow 9am IST, in 15 minutes) via Chrono
  • Cron (*/5 * * * *) via cron-parser
  • RRULE (FREQ=DAILY;BYHOUR=9;BYMINUTE=0;BYSECOND=0;TZID=Asia/Kolkata)
  • One-shot reminders & recurring schedules
  • Webhook dispatch + programmatic handlers
  • Storage adapters: in-memory and MongoDB
  • Express/Nest adapters, CLI worker

Install

npm i schedkit-universal luxon rrule cron-parser chrono-node mongodb

Define and run

import { createScheduler, MongoStorage } from "schedkit-universal/core";
import { MongoClient } from "mongodb";

const client = new MongoClient(process.env.MONGO_URI!);
await client.connect();
const storage = new MongoStorage(client.db(process.env.MONGO_DB));

const scheduler = createScheduler({
  storage,
  defaultTz: "Asia/Kolkata",
  dispatch: async (job) => {
    // YOUR handler: send email / push / whatever
    console.log("Reminder fired:", job.name, job.payload);
  }
});

scheduler.start(); // background tick

Create reminders (Express)

import express from "express";
import { createScheduleRouter } from "schedkit-universal/express";
const app = express();
app.use(express.json());
app.use("/api/schedule", createScheduleRouter(scheduler));

POST /api/schedule/jobs

{
  "name": "Daily standup",
  "tz": "Asia/Kolkata",
  "rrule": "FREQ=WEEKLY;BYHOUR=10;BYMINUTE=0;BYSECOND=0;BYDAY=MO,TU,WE,TH,FR",
  "payload": { "room": "huddle-1" }
}

or natural language

{ "name": "Hydrate!", "nlp": "in 20 minutes", "tz": "Asia/Kolkata" }

or cron

{ "name": "Nightly job", "cron": "0 2 * * *", "tz": "UTC" }

CLI

# run a worker loop using Mongo
npx schedkit worker --uri "$MONGO_URI" --db mydb --tz "Asia/Kolkata"

# schedule via CLI (natural language)
npx schedkit schedule --name "Demo" --nlp "tomorrow 9am" --tz "Asia/Kolkata"

Notes

  • DST-safe (RRULE/Luxon). For cron, we evaluate in the specified TZ each tick.
  • Misfire protection via short lease; jobs won’t double-fire in multi-process setups (Mongo storage).
  • You can export ICS later; extend dispatch to email/calendar.

MIT

FAQs

Package last updated on 04 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts