Cron-driven enqueue
A scheduled cron fires hourly, queries for invoices due today, and enqueues one job per customer. The worker drains the queue.
What goes silently wrong
If the cron skips (DST, package upgrade, broken crontab), the queue stays empty and the worker shows green — but no work happened. You only notice when the customer asks where their invoice is.
Drumbeats recipe
- JOB_CRON · the producer
Did the cron actually fire on schedule?
- JOB_HEARTBEAT · the worker loop
Is the consume loop still pulling?
- JOB_BASIC · per job (optional)
Did each enqueued job actually run?
# producer (cron, hourly) 0 * * * * /opt/scripts/enqueue-invoices.sh && \ curl -s "$DB/v1/ping/CRON_MONITOR_ID" # worker loop (heartbeat every 5 min) loop: job = queue.pop() process(job) curl -s "$DB/v1/ping/HEARTBEAT_MONITOR_ID"