BotNetwork

Scheduled retention jobs

delete or anonymize expired rows on a schedule you can prove

Guide1 min readUpdated

Why it matters

Delete or anonymize expired rows on a schedule you can prove.

Practical steps

  1. Choose storage for data data retention jobs deliberately (SQLite vs Postgres vs KV); document why.
  2. Implement delete or anonymize expired rows on a schedule you can prove with migrations that are additive and reversible where possible.
  3. Use transactions / idempotency keys so retries of data data retention jobs do not double-write.
  4. Add a fixture DB and migration test covering data data retention jobs.
  5. Document backup/restore touching tables used by data data retention jobs.

Watch out for

  • Copy-pasting outdated snippets for data data retention jobs without re-reading current official docs.
  • Shipping data data retention jobs to production without a staging rehearsal and a documented rollback.

Related comparisons and tools