Short answer: for a fintech user reminder system, keep the reminder and its occurrence identity in Postgres, use delayed jobs for near-term work, and use cron only to discover longer-horizon or recurring work; the decisive property is retry-safe idempotency, not the mechanism that wakes a process.
That distinction sounds narrow until money, consent, and auditability enter the picture. A timer says that work should be attempted. It does not prove that one reminder occurrence was delivered once, suppressed once, or deliberately retried. The database must carry that proof, while the scheduler and queue remain replaceable transport.
The clock is not the ledger.
What should a user reminder system record before it schedules work?
Start with an immutable occurrence rather than a job. A reminder has a user-facing intent, such as “send a payment due notice at 09:00 in Europe/Paris,” while an occurrence is one computed attempt at that intent. Store the reminder ID, occurrence ID, local time-zone identifier, computed UTC instant, template or notification type, consent snapshot reference, and state transitions. For a recurring reminder, calculate the next occurrence from the durable recurrence rule after the current one has reached a terminal state.
The uniqueness boundary matters. (reminder_id, occurrence_number) is often clearer than a timestamp because two legitimate occurrences can share a timestamp during a policy-defined DST transition. If the product instead defines an occurrence by an exact instant, (reminder_id, scheduled_for_utc) can work. Pick one definition and make it a database constraint; application code alone cannot survive two workers racing after a retry.
There is a second time decision that teams tend to postpone: what happens to a nonexistent or ambiguous local time? Europe and the US both have daylight-saving transitions, so a recurring reminder needs an explicit policy such as “shift forward,” “choose the earlier instant,” or “ask the user.” Store the original local intent as well as the resolved instant. Otherwise, a later reconciliation cannot explain why a reminder moved by an hour.
For the ledger-shaped record, a small schema is enough:
type ReminderOccurrence struct { ReminderID string OccurrenceID string ScheduledForUTC time.Time TimeZone string Status string // pending, claimed, sent, suppressed, failed AttemptCount int ClaimedAt *time.Time DeliveredAt *time.Time } // The database enforces one durable identity per business occurrence. // CREATE UNIQUE INDEX occurrences_identity ON reminder_occurrences (reminder_id, occurrence_id); The comment is not a substitute for a migration, of course. It is the invariant the migration must enforce.
How do delayed jobs, cron, and Postgres divide responsibility?
Use delayed jobs when the due time is close enough that retaining an individual message is operationally sensible. The message should contain an occurrence ID, not a copied user profile or notification payload. At consumption time, the worker reads the authoritative reminder state from Postgres, checks consent and suppression rules, and then attempts the external delivery.
Use cron for discovery, not delivery. A cron invocation should select a bounded batch of due or nearly due occurrences, claim them with a short transaction, and enqueue their IDs. It should finish quickly enough that a missed or repeated invocation is ordinary. A database sweep with a small overlap is safer than trusting a single trigger: the overlap may publish the same occurrence twice, but the business constraint makes that duplicate harmless.
This is the useful separation for a Node.js service: the web request writes intent; Postgres owns durable time and state; cron finds work; a queue absorbs bursts; and one worker path performs the side effect. The same worker can handle a reminder discovered by a sweep and one released by a delayed job. Fewer delivery paths mean fewer idempotency proofs.
The handoff still has a failure window. A transaction can commit the claim and crash before publishing, or publish and crash before recording the publication. Solve that with an outbox row written in the same transaction as the occurrence transition, followed by a publisher that retries unsent outbox rows. If an outbox is too much machinery for the first release, at least expose “due without queued identity” as a reconciliation metric; pretending the gap does not exist is worse.
What does retry-safe delivery look like in a fintech backend?
Assume at-least-once delivery. A worker may receive the same message after completing an email provider call but before its acknowledgment is durable. It may also receive two copies concurrently. The worker therefore needs a claim protocol and an idempotency key that reaches the notification boundary when that boundary supports one.
The ordering is deliberate:
- Read the occurrence and attempt an atomic transition from
pendingtoclaimed, or observe that another worker owns it. - Commit the claim and increment the attempt count.
- Perform the external side effect with the occurrence ID as its idempotency key.
- Record
sent,suppressed, or a retryable failure in an audit transaction. - Acknowledge the queue message only after the durable result exists.
That sequence cannot create exactly-once network behavior by itself; an external provider can time out after accepting a request. “Exactly once” is therefore a business-level goal implemented through stable identity, provider idempotency where available, and reconciliation. The audit trail must distinguish “accepted by provider,” “unknown after timeout,” and “not attempted.” Those are different operational facts.
Here is the shape of a claim in Go. The SQL deliberately makes a repeated delivery a normal result rather than an exception.
func claimOccurrence(ctx context.Context, tx *sql.Tx, reminderID, occurrenceID string) (bool, error) { result, err := tx.ExecContext(ctx, ` UPDATE reminder_occurrences SET status = 'claimed', claimed_at = CURRENT_TIMESTAMP, attempt_count = attempt_count + 1 WHERE reminder_id = $1 AND occurrence_id = $2 AND status = 'pending' `, reminderID, occurrenceID) if err != nil { return false, err } updated, err := result.RowsAffected() return updated == 1, err } If the process dies after the claim, a lease or a recovery transition should make stale claims visible without silently sending twice. The lease duration is a product and provider decision, not a magic constant. Measure it against provider timeouts, expected queue delay, and the cost of a duplicate notification.
Which architecture fits Europe, the US, and recurring reminders?
There is no universally cheapest architecture because operational recovery is part of the cost. A practical comparison looks like this:
| Pattern | Appropriate use | Main trade-off |
|---|---|---|
| Delayed job per occurrence | One-off reminders close to delivery time | Simple handoff, but long retention and provider uncertainty still need a database record |
| Cron plus queue | Far-future reminders and recurring schedules | The sweep must tolerate missed, duplicated, and overlapping runs |
| Postgres polling only | Small volume with a worker already connected to the database | Fewer services, but polling load and burst control become your responsibility |
| Workflow engine | Multi-step reminders with approvals, joins, or compensation | Stronger workflow semantics, with a broader operating model to maintain |
For Europe and the US, keep the user's IANA time-zone name, never a fixed offset, and test the transition dates that matter to the product. Test duplicate queue messages, a crash between side effect and acknowledgment, a database failover during a claim, and a cron run that starts twice. A green unit test for “send at 09:00” proves very little.
The catch is that a hybrid design is not suitable when the product cannot tolerate a queue and a worker as separate operational responsibilities. In that case, a Postgres-backed worker may be the better first step, provided its polling, lease recovery, and audit queries are treated as production features. Stick with a workflow engine when reminders have become a dependency graph; do not adopt one merely to avoid writing a unique index.
How should a team roll out and reconcile the reminder path?
Ship the occurrence table and audit events first, behind a flag. For a period, let the existing sender remain authoritative while a shadow worker calculates claims and reports mismatches without sending. Compare due counts, suppressed counts, provider acknowledgments, and stale claims by time zone. This catches recurrence and DST policy mistakes before they become user-visible.
Then enable one delivery class at a time: near-term one-off reminders, long-horizon reminders discovered by cron, and recurring schedules. Keep the queue message small and make the consumer reload current consent and template data. A reminder is an instruction, not permission that survives a user changing preferences.
The daily reconciliation query should find at least three classes: due occurrences with no outbox record, outbox records with no successful publish acknowledgment, and claimed occurrences whose lease expired without a terminal audit event. Alerting on queue depth alone misses all three because an acknowledged message has disappeared from the queue. Your mileage may vary on thresholds, but the categories should not be optional.
The durable rule is modest: scheduling may happen more than once, delivery may be attempted more than once, and the ledger must still explain one occurrence. That is the standard I would use to choose between delayed jobs, cron, and a Postgres worker for a fintech reminder system.

