Short answer: use nightly cron only to call a small Node.js HTTP endpoint; let that endpoint enqueue a cleanup sweep, then let idempotent queue workers delete old renewal records in bounded batches. Keep a short cleanup inline only when its worst-case duration fits comfortably inside the request deadline. For an edtech renewal system, “old” is a business rule, not created_at < now() . A reminder may have been created weeks ago and still need to wait for a district's renewal deadline. The ...