Menu

Webhook Follow-Up Task Scheduling: One Hour Later with Queues or Cron Explained
📰

Webhook Follow-Up Task Scheduling: One Hour Later with Queues or Cron Explained

DEV Community: node·SiegfriedFletcher5869·16 days ago
#xwQ0UUBi
#devtonodejs#devto#dev#event#queue
Reading 0:00
15s threshold

Webhook Follow-Up Scheduling: Delayed Messages vs Per-Event Timers Explained

Short answer: for a logistics webhook that must run about an hour later, put a durable due time in a queue-backed table and let a bounded worker claim it; use a cron sweep as the recovery path, not one timer per event. This keeps latency visible while a rate-limited pool drains at a controlled cost.

Imagine a carrier sends package.delivered while your label service is already busy. The follow-up checks for a missing proof-of-delivery image 60 minutes later. A process-local timer is easy to write, yet a deploy, crash, or horizontal scale-out can erase it. A per-event cron entry survives longer, but thousands of entries turn operations into bookkeeping.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.