Menu

Cron Trigger Queues: Rate-Limited Processing Through a Public Webhook Endpoint
📰

Cron Trigger Queues: Rate-Limited Processing Through a Public Webhook Endpoint

DEV Community: go·PantaleonShaw8478·4 days ago
#dNcAJu8E
#devtogo#devto#dev#queue#cron
Reading 0:00
15s threshold

Short answer: use cron every minute only to call a public HTTPS enqueue endpoint; let queue workers perform the rate-limited processing, with deterministic job IDs so duplicate delivery cannot send a renewal reminder twice.

For an e-commerce renewal reminder, the business deadline belongs in durable application data. Cron supplies a periodic wake-up, the webhook finds work due by that deadline, and the queue absorbs the difference between discovery rate and processing rate. Do not put the long-running loop inside the cron invocation.

This split matters during recovery. A paused cron does not backfill its missed runs, cron timing has second-level jitter, and a standard queue is at-least-once. The design therefore needs a reconciliation scan and an idempotent consumer, not faith in a perfectly timed trigger.

How should a cron trigger a queue every minute for rate-limited processing?

Treat the public webhook endpoint as a small dispatcher.…

Continue reading — create a free account

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