A Cron manager system for Deno binaries by Mandarine.
Little Crony is a CRON jobs manager which allows you to create and run tasks based on CRON expressions.
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)
* * * * * * *
- 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.
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();
For questions & community support, please visit our Discord Channel or join us on our twitter.
In order to submit improvements to the code, open a PR and wait for it to review. We appreciate you doing this.
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.
- Author : Andres Pirela
- Website : https://www.mandarinets.org/
- Twitter : @mandarinets
- Discord : Click here