Skip to main content
This release was yanked — the latest version of @coven/cron is 0.3.3. Jump to latest

@coven/cron@0.0.5
Built and signed on GitHub Actions

⏳ Fantastic cron parser and constructor.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (0.0.5)
Coven Engineering Cron logo

JSR JSR Score

⏳ A fantastic cron parser and constructor.

Example

import { parse, stringify } from "@coven/cron";

const cron = parse("1-2,3,4 * 2 8,9 1");
/*
	{
		minutes: [{ from: 1, to: 2 }, 3, 4],
		hours: "*",
		dayOfMonth: 2,
		month: [8, 9],
		dayOfWeek: 1
	}
*/

stringify(cron); // "1-2,3,4 * 2 8,9 1"

// Also works with partials:
stringify({ hours: 13 }); // "* 13 * * *"

// Only parses with valid dates:
parse("* * 31 2 *"); // undefined because 2/31 is invalid
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@coven/cron

Import symbol

import * as cron from "@coven/cron";

---- OR ----

Import directly with a jsr specifier

import * as cron from "jsr:@coven/cron";

Add Package

npx jsr add @coven/cron

Import symbol

import * as cron from "@coven/cron";

Add Package

yarn dlx jsr add @coven/cron

Import symbol

import * as cron from "@coven/cron";

Add Package

pnpm dlx jsr add @coven/cron

Import symbol

import * as cron from "@coven/cron";

Add Package

bunx jsr add @coven/cron

Import symbol

import * as cron from "@coven/cron";