skeddy
v1.0.1
Published
Simple async task scheduler with catch-up for long running tasks
Downloads
1
Readme
skeddy
Simple async task scheduler with catch-up for long running tasks
Why
If you want something to run every 10s and it takes a few seconds.
Usage
const createScheduler = require('skeddy');
const scheduler = createScheduler();
scheduler.add(function () {
return new Promise(resolve => {
console.log(Date.now(), 'I still run approx every 3 seconds.')
setTimeout(resolve, Math.random() * 3000)
})
}, 3000);