How It Works

Why We Skipped the Job Queue: Simple Cron Jobs vs. BullMQ

When idempotent sweeps beat a full job queue, and the signals that tell you it is finally time to add one.

TIMO360 logoTIMO360 Team1 min read
Why We Skipped the Job Queue: Simple Cron Jobs vs. BullMQ

Key takeaways

  • Ingestion, aggregation and reports are bounded per-tenant work done on the request path
  • Two jobs run as in-process cron: device liveness and data retention
  • Both are idempotent sweeps with no per-item retry needs
  • Introduce a queue when per-event background work appears, not before

Queues are not free

A queue adds infrastructure, retry policy, monitoring and failure modes. It earns its place when work is slow, spiky or needs per-item retries. Most of this platform's work is none of those.

The two jobs we do run

Device liveness runs every minute. It marks devices whose heartbeat lapsed as offline and raises one deduplicated notification per device. Data retention runs daily at 02:00 and deletes events, sessions and reports older than each organization's configured window.

Idempotence over retries

Both jobs are sweeps. Running one twice, or missing a run, is harmless because the next run reaches the same end state. That removes the main reason to reach for a queue.

When to change course

If you add per-event background work, such as queued export generation, you want retries, backoff and visibility. That is the point to introduce a real queue.

Ready for Attendance & Presence Tracking That Respects Your Team?

Set up your organization, install the agent, and start seeing attendance and presence data in minutes — without a single keystroke or screenshot recorded.

Windows, macOS & Linux Pay per employee license Zero keystroke or screen capture
Chat with us