Leaf
A Cron manager system for Deno binaries by Mandarine.
Description
Little Crony is a CRON jobs manager which allows you to create and run tasks based on CRON expressions.
Supported Expresions
Little Crony supports 3 different lengths in the expression:
5 Parameters: (Minute, Hour, Day of The Month, Month, Day of The Week)
* * * * *
6 Parameters: (Seconds, Minute, Hour, Day of The Month, Month, Day of The Week)
* * * * * *
7 Parameters: (Seconds, Minute, Hour, Day of The Month, Month, Day of The Week, Year)
* * * * * * *
Format
- Seonds: From 0 to 59
- Minute: From 0 to 59
- Hour: From 0 to 23
- Day of The Month: From 1 to 31
- Month: From 1 to 12 (Abbreviatons and Names accepted)
- Day of The Week: From 0 (Sunday) to 6 (Abbreviatons and Names accepted)
- Year: Any numeric value.
Usage
import { CronManager } from "https://deno.land/x/little_crony@v1.0.0/mod.ts"
const cronManager = new CronManager();
// cronManager.create(expression: string, handler: () => void, timeZone?: string)
cronManager.create("* * * * * * *", () => console.log("Runs every second"));
// Begin Task Scheduler
cronManager.beginTasks();
// Stops Scheduler and clears internal interval
cronManager.stopTasks();
// Deletes all the tasks registered
cronManager.clearTasks();
Questions
For questions & community support, please visit our Discord Channel or join us on our twitter.
Want to help?
Interested in coding
In order to submit improvements to the code, open a PR and wait for it to review. We appreciate you doing this.
Not interested in coding
We would love to have you in our community, please submit an issue to provide information about a bug, feature, or improvement you would like.
Follow us wherever we are going
- Author : Andres Pirela
- Website : https://www.mandarinets.org/
- Twitter : @mandarinets
- Discord : Click here