Miss any of our Open RFC calls?Watch the recordings here! »

@vangware/cron

4.0.3 • Public • Published

@vangware/cron logo

Build Status License NPM Version Open Issues Size

Cron Quartz and Cron UNIX expression parser.

Usage

📦 Node

import { parseStringQuartz, parseCronQuartz } from "@vangware/cron";
 
const cron = parseStringQuartz("1-2/3 1-2,3,4 * 2W SEP,OCT 1L */10");
/*
{
    seconds: { every: 3, start: { from: 1, to: 2 } },
    minutes: [{ from: 1, to: 2 }, 3, 4],
    hours: "*",
    dayOfMonth: { nearest: 2 },
    month: ["SEP", "OCT"],
    dayOfWeek: { last: 1 },
    year: { every: 10, start: "*" }
}
*/
 
parseCronQuartz(cron); // "1-2/3 1-2,3,4 * 2W SEP,OCT 1L */10"

🦕 Deno

import { parseStringQuartz, parseCronQuartz } from "https://cdn.skypack.dev/@vangware/cron";
 
const cron = parseStringQuartz("1-2/3 1-2,3,4 * 2W SEP,OCT 1L */10");
/*
{
    seconds: { every: 3, start: { from: 1, to: 2 } },
    minutes: [{ from: 1, to: 2 }, 3, 4],
    hours: "*",
    dayOfMonth: { nearest: 2 },
    month: ["SEP", "OCT"],
    dayOfWeek: { last: 1 },
    year: { every: 10, start: "*" }
}
*/
 
parseCronQuartz(cron); // "1-2/3 1-2,3,4 * 2W SEP,OCT 1L */10"

Install

npm i @vangware/cron

DownloadsWeekly Downloads

11

Version

4.0.3

License

MIT

Unpacked Size

237 kB

Total Files

540

Last publish

Collaborators

  • avatar