Skip to content

A bidirectional tool for converting cron expressions between unix and quartz formats

License

Notifications You must be signed in to change notification settings

rahu619/cron-converter-u2q

Repository files navigation

cron-converter-u2q

Easily convert cron expressions between Unix and Quartz formats with the cron-converter-u2q package

example event parameter example event parameter NPM version

Features

🔄 Two-way conversion: from Unix to Quartz and Quartz to Unix.

Installation

Using npm:

npm install cron-converter-u2q

Using yarn:

yarn add cron-converter-u2q

Usage

Firstly, import the CronConverterU2Q module:

var cron_converter_u2q = require("cron-converter-u2q");

var c2q = cron_converter_u2q.CronConverterU2Q;

If you're using ES6 Modules

import { CronConverterU2QModule as c2q } from "cron-converter-u2q";

Convert from Unix to Quartz

const quartzExpression = c2q.unixToQuartz("5 * * * *");

Convert from Quartz to Unix

const unixExpression = c2q.quartzToUnix("* */5 * ? * * *");

Development Notice

This package is still under active development. Some methods and features might not be stable yet. We're working diligently to improve and stabilize the package. Any feedback, suggestions, or contributions are highly appreciated!

License

This project is licensed under the MIT License