Menu

App Cron Webhooks Beat Database Jobs in 3 Scheduled Data Cleanup Cases (Simplest)
📰

App Cron Webhooks Beat Database Jobs in 3 Scheduled Data Cleanup Cases (Simplest)

#devcommunity#dev#subscriber#delivery#tick
Reading 0:00
15s threshold

Short answer: choose a database timer when cleanup is one bounded, transactional delete; choose an app cron webhook when the job must fan out shipment updates, retry subscribers independently, and expose delivery state.

For a gaming marketplace, “delete old shipment rows every night” sounds like a database problem. It stops being one as soon as the cleanup must notify storefronts, guild tools, and player apps before those rows disappear. The scheduler is no longer the hard part. Retry ownership is.

My default for that second shape is the app layer — but only because it can give every subscriber an idempotency key and a separate delivery record. For a small retention sweep with no external effect, keeping the timer beside the data is simpler and usually easier to operate.

The before-and-after mental model

Before fan-out, the diagram in words is tiny: clock → database transaction → deleted rows. A PostgreSQL job such as pg_cron can fit that boundary.…

Continue reading — create a free account

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