skeddy

Simple async task scheduler with catch-up for long running tasks

Usage no npm install needed!

<script type="module">
  import skeddy from 'https://cdn.skypack.dev/skeddy';
</script>

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);