Pragma Scheduler
This a smart scheduler implementation
- First of all it always waits end of handler work and only then schedule next handler call in specified interval
- It works using setTimeout not setInterval therefore it does not overflow event loop queue
- You can specify start delay, interval and can stop scheduler any moment you want
Usage
To install just use NPM
npm install pragma-scheduler
var PragmaScheduler = counter = 0 scheduler = 3000 1000 { console; if counter === 5 scheduler; }; schedulerstart;
Pragma Dudes wish you live long and prosper.