skedgy
Periodically check for and queue work to be done!
Skedgy (pronounced "ske-gee") is an opinionated scheduling library for NodeJS. The purpose of skedgy is to periodically check for work with a random delay between each check, as well as queue and execute tasks with a random delay between each execution. The goal was to create a scheduler that acts naturally, not with exact timing that can be tracked. Tasks are always run one at a time and never retried.
Example:
; // Create a limited set of random 'response' data...; // Pretend this is a much cooler check... // Pretend this is a much cooler action... ; // Start the scheduler...sched.start; setTimeout, 60 * 1000;
Features:
- Simple to use API.
- Built on Promises!
- Randomly vary the interval between polling.
- Throttle the work functions with a random range (so it's not predictable).
- Persists work to super simple, overridable queue (defaults to in-mem queue).
Contribute
- Fork it
npm i
npm run watch
- Make changes and write tests.
- Send pull request! 😎
License:
MIT