Menu

Recurring reminders: delayed jobs, cron, and durable delivery
📰

Recurring reminders: delayed jobs, cron, and durable delivery

DEV Community: python·HarrisonFord3572·6 days ago
#1vlts971
#devtopython#devto#dev#worker#occurrence
Reading 0:00
15s threshold

Short answer: model each reminder occurrence as durable application data, use delayed work to process a specific due occurrence, and use cron only as a periodic trigger for bounded maintenance or materialization. The deciding constraint is recoverability: a reminder must still have an explainable state after a process restart, a retry, or a user cancellation.

This can start with a Postgres-backed ledger and workers when Postgres is already the application's durable store. It does not require treating a timer library as a scheduler of record. In a Node.js application, the web process can create or update reminder rules while a separate worker claims due rows; the same data model also works when a Python worker owns the scheduling loop. Keep the contract in the database, not in a long-lived process.

The cheap-looking version is an in-memory timer per reminder. It works in a notebook. Deploys, restarts, and horizontal scaling make its state private and disposable.…

Continue reading — create a free account

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