A lightweight, zero-dependency job scheduler that runs async tasks at fixed intervals. Version 1.0.9 is the current stable release; the package is mature and used in production, but the GitHub repo shows low maintenance activity. It supports automatic retries on failure, a decorator pattern for wrapping functions, and simple thunk-based job submission. Unlike full-featured job queues (e.g., Bull, Agenda), it has no persistence, clustering, or advanced scheduling; its simplicity makes it ideal for rate-limiting API calls in single-process applications. A sharded version is available separately.
npm install async-interval-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with 1s interval, adds a job with retry, and logs the result.
Call queue.start() manually after adding jobs with doNotStart=true, or add without doNotStart to auto-start.
Use arrow functions or bind the original function before decorating if 'this' is needed.
Always return a promise from the thunk; wrap sync code in Promise.resolve().
Use CommonJS require: const AsyncQueue = require('async-interval-queue');Ensure you have an instance: const queue = new AsyncQueue(1000);
Wrap the promise in an arrow function: queue.add(() => myPromise, ...);
No dependency data recorded yet.