Short answer: use a small scheduler to create one delivery job, then let a durable message queue fan that job out; keep a cron-only path for low-volume, non-urgent reports.
I run a one-person SaaS, so every moving part has to earn its place in revenue-per-hour. A fintech shipment update is a useful stress test: one status change may need to reach a customer, a merchant, a risk service, and an audit mailbox. The choice is not “cron or queue” in the abstract. It is how much latency and recovery work the notification is allowed to carry.
The decision matrix
| Pattern | Typical latency | Recovery behavior | Operational cost | Good fit |
|---|---|---|---|---|
| Cron worker sends directly | Minutes to one run interval | Re-run a batch, risk duplicates | Lowest | A daily report email with forgiving deadlines |
| Scheduler publishes one message | Seconds after the tick | Queue retains work after a process restart | Medium | Shipment updates where delivery should start quickly |
| Scheduler plus queue plus workers | Seconds, with parallel fanout | Per-recipient retry and dead-letter handling | Highest | Large subscriber sets or strict delivery evidence |
The middle row is my default. It keeps the scheduler boring and moves retry complexity into a component designed to hold work. Ship weekly. Outsource the undifferentiated plumbing.
How should a Node.js SaaS schedule daily report email and shipment fanout?
Treat scheduling and delivery as two different clocks. A cron expression (the five-field format documented in crontab(5)) answers “when should I create work?” It does not answer “did every recipient receive this version?” A queue answers the second question only if the consumer acknowledges work after the side effect is durable.
For a daily report email, one scheduled command can select the reporting window, persist a report identifier, and enqueue a single message. For a shipment update, the message contains an immutable event ID and a snapshot of the status, not a pointer to mutable “current state.” Workers expand the subscriber list and write an idempotency record before sending.
Here is the shape I use in TypeScript. The interfaces are intentionally generic so the transport can be replaced without rewriting business code.
type ShipmentEvent = { eventId: string; shipmentId: string; status: "in_transit" | "delivered" | "delayed"; occurredAt: string; }; async function publishShipment(event: ShipmentEvent) { await queue.publish("shipment.updated", event, { messageId: event.eventId }); } async function consumeShipment(message: ShipmentEvent) { if (await deliveries.exists(message.eventId)) return; const recipients = await subscribers.forShipment(message.shipmentId); for (const recipient of recipients) { await sendNotification(recipient, message); } await deliveries.record(message.eventId); await message.ack(); } The ordering matters. If the process dies before ack(), the broker can redeliver; RabbitMQ describes this acknowledgement model in its confirms documentation. That means sendNotification must tolerate a duplicate, usually by keying a delivery table on (eventId, recipientId). Exactly-once delivery is not a promise to make casually. At-least-once plus idempotency is the practical contract.
Where latency becomes a cost decision
Fanout width drives both sides of the trade. Sending 20 notifications inline may finish inside one request budget. Sending 20,000 can hold database connections, hit provider rate limits, and turn a single delayed recipient into head-of-line blocking. A queue lets workers run in bounded batches, but each worker, metric, and retry policy adds a bill and an on-call surface.
I measure three timestamps: event creation, queue publish, and provider acceptance. The useful latency is publish-to-acceptance by percentile, not the average duration of a cron process. Cost is similarly concrete: database reads per subscriber, queue operations, worker runtime, and provider attempts. A cheap architecture that misses a merchant’s cutoff is expensive in a way a dashboard will not show.
Keep the scheduler single-purpose. Use a lock or a database lease so two instances do not create the same report. Store the intended timezone explicitly; daylight-saving transitions can otherwise create a missing or duplicated daily run. For a report that can arrive at 08:15 instead of 08:00, a cron-only batch remains sensible. For a shipment delay alert, waiting for the next batch is the wrong latency budget.
Failure modes worth rehearsing
Test the ugly middle, not just the happy path. Kill a worker after the provider accepts a message and before the acknowledgement. Pause the broker for five minutes. Make the subscriber query return an empty page halfway through pagination. Then inspect whether the event is retried, deduplicated, and visible to an operator. I also run this exercise with a deliberately slow provider response and a database connection pool limited to two connections. The point is to watch pressure move through the system: queue age should rise before the API times out, retries should spread out instead of arriving as a second spike, and a replay should create a new attempt record without erasing the original evidence. A staging drill that only checks a green process exit misses all of those signals, so I keep the failure script beside the worker tests and run it before a release that changes delivery code.
Backoff should be bounded and jittered. Permanent failures need a dead-letter queue with the original event, recipient, and attempt count. A replay command should require an explicit event ID, because “send yesterday again” is an invitation to duplicate money-moving notices. Logs should carry a correlation ID shared by the scheduler run, queue message, and provider request.
Metrics complete the loop: scheduled runs missed, publish failures, queue age, attempts per recipient, and acceptance latency. Alerts should target violated service objectives, not every transient retry. Your mileage may vary on thresholds; subscriber volume and provider limits decide them.
The queue is not automatically better. It is unsuitable when the job is a tiny internal report, the deadline is loose, and nobody needs per-recipient replay. A cron process that writes a run record and sends a bounded batch can be easier to deploy and cheaper to operate.
Keep it boring.
Stick with the direct batch until a measured failure justifies another worker: repeated timeouts, unacceptable queue age, or a requirement to prove each recipient was attempted. Then add the queue behind the same persisted event model. That migration preserves the business contract while changing the transport, which is exactly the kind of undifferentiated work I want off my weekly shipping path.


