@vangware/cron
    TypeScript icon, indicating that this package has built-in type declarations

    5.0.1 • Public • Published

    Vangware's Cron

    Build Status Coverage License NPM Version Open Issues

    ⏲️ 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?dts";
    
    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"

    Documentation

    Documentation can be found HERE. It is auto-generated with typedoc based on the JSDocs and the types in the source. Shouldn't be necessary to read this, code editors like VSCode integrate the documentation in the UI.

    Changelog

    Changelog can be found HERE.

    Test coverage

    Test coverage can be found HERE.

      This feature is exclusive to Teams

      Illustration of wombats

      The package file explorer is only available for Teams at the moment.

      We may support exploring this package in the future. Check back soon.

      Install

      npm i @vangware/cron

      DownloadsWeekly Downloads

      59

      Version

      5.0.1

      License

      MIT

      Unpacked Size

      108 kB

      Total Files

      271

      Last publish

      Collaborators

      • lukeshiru