When we first built scheduled publishing, the obvious design was a scheduled_posts table and a cron that polled it every minute. It worked — until it didn't.
The problems with a cron
- Minute-level granularity means posts drift by up to 60 seconds from their scheduled time.
- Retries are manual to implement and easy to get wrong.
- A single slow job blocks every other post in the window.
- Scaling across regions gets ugly fast.
Queues instead
We moved to Cloudflare Queues. When a post is scheduled we enqueue a delayed message with the publish time as the delay. Cloudflare delivers the message to a consumer worker at the right moment, retries on failure with exponential backoff, and lets us parallelise across thousands of posts without thinking about it.
Result: posts publish within seconds of their scheduled time, failures self-heal, and we deleted about 200 lines of cron bookkeeping code.
