Easily convert cron expressions between Unix and Quartz formats with the cron-converter-u2q
package
🔄 Two-way conversion: from Unix to Quartz and Quartz to Unix.
Using npm:
npm install cron-converter-u2q
Using yarn:
yarn add cron-converter-u2q
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 * ? * * *");
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!
This project is licensed under the MIT License