A lightweight, configurable job queue for Node.js and browsers that schedules function execution with configurable interval, timeout, retry, and retry interval. v1.1.0 (stable, no recent updates). Provides three patterns for async control: synchronous boolean returns, callback-based (done/error), and Promise-based. Events for 'end' and 'error'. Differentiator: simple timer-based queue without external dependencies, supporting per-job retry and delay.
npm install timer-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a timer queue with 1s interval, 5s timeout, 2 retries. Pushes three jobs using boolean return, callback, and Promise patterns. Starts automatically.
Create your own .d.ts or use @types/timer-queue if available.
Ensure job returns Boolean (true/false) or a Promise, or uses callback pattern correctly.
Either set autostart: true or call tq.start() after pushing jobs.
Consider using more actively maintained queue libraries like p-queue or bull for advanced needs.
import TimerQueue from 'timer-queue'
Use push((done, error) => { ... }) not push(function(done, error) { ... }) with wrong signature.No dependency data recorded yet.