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

@cronlabs/core

v0.1.0

Published

The CronLabs cron engine: parse, validate, explain, compute next runs, detect scheduling edge cases (DST, phantom schedules), and convert between platform cron dialects. Pure TypeScript, no I/O.

Readme

@cronlabs/core

The cron engine that powers CronLabs. It parses and validates cron expressions, computes upcoming run times, explains schedules in plain English, detects the edge cases that cause real outages (daylight saving skips and double-fires, phantom schedules, frequency surprises), and converts a standard cron expression into other platform dialects.

It is written in TypeScript with no I/O, so it runs the same way in the browser, in edge functions, in a CLI, and on a server.

Install

npm install @cronlabs/core

Node.js 18 or newer is required. The package ships as ES modules with type definitions.

Validate an expression

validateCron returns whether the expression is valid, its next run times, a plain-English description, and any detected edge cases.

import { validateCron } from "@cronlabs/core";

const result = validateCron("30 2 * * *", {
  timezone: "America/New_York",
  count: 5,
});

result.isValid;     // true
result.description; // "At 02:30 AM"
result.nextRuns;    // Date[] (the next 5 run times)
result.edgeCases;   // structured findings, including DST skips for 02:30

validateCron accepts these options:

  • timezone: an IANA timezone used to compute run times. Defaults to "UTC".
  • count: how many upcoming runs to return. Defaults to 10.
  • year: the reference year used when scanning for edge cases. Defaults to the current year.

The result includes a warnings array of human-readable strings and an edgeCases array of structured findings. Each edge case has a kind ("phantom", "rare", "frequency", "dom-dow-or", "dst-skip", or "dst-double"), a severity ("info" or "warning"), and a message.

Describe and inspect

import { describeCron, parseCronFields } from "@cronlabs/core";

describeCron("0 9 * * 1-5"); // "At 09:00 AM, Monday through Friday"

parseCronFields("0 9 * * 1-5");
// [{ name: "Minute", value: "0", description: "0-59" }, ...]

Convert to other platforms

convertCron translates a standard five-field expression into the dialect and native configuration of another platform. convertAll returns the conversion for every supported target.

import { convertCron, convertAll, CONVERSION_TARGETS } from "@cronlabs/core";

const aws = convertCron("0 9 * * 1-5", "aws-eventbridge");
aws.schedule; // "cron(0 9 ? * 2-6 *)"
aws.snippet;  // a ready-to-use AWS CLI command
aws.notes;    // platform gotchas for this expression

convertAll("0 9 * * 1-5"); // one Conversion per target in CONVERSION_TARGETS

Supported targets (CONVERSION_TARGETS):

  • unix-cron (crontab, Vixie/cronie)
  • github-actions
  • vercel
  • kubernetes
  • aws-eventbridge
  • gcp-scheduler
  • systemd
  • quartz (Quartz and Spring)
  • node-cron
  • celery

Each conversion reports platform gotchas as notes. Examples include the AWS and Quartz day-of-week reindexing to 1-7 with 1 as Sunday, the rule that one of day-of-month or day-of-week must be ? on those platforms, the UTC-only behaviour of GitHub Actions schedules, and the Vercel Hobby plan limits.

Daylight saving transitions

getDstTransitions returns the spring-forward and fall-back dates for a timezone in a given year. This is what lets a calendar view flag the days where a wall-clock schedule can skip or fire twice.

import { getDstTransitions } from "@cronlabs/core";

getDstTransitions(2026, "America/New_York");
// [{ day: 8, month: 3, type: "spring-forward" }, { day: 1, month: 11, type: "fall-back" }]

License

MIT