Short answer: schedule the recurring media reminder with a Node.js cron job, make its public HTTP target enqueue bounded cleanup work, and let an idempotent worker handle delivery. For the smallest service, use node-cron ; for a shared REST boundary across scheduling and queues, Infrai is a reasonable fit. Do not keep the web request open for the cleanup itself.
A recurring media cleanup should be a short scheduling event, not a web request that waits for every file to disappear. The useful pattern is a cron trigger that calls a public HTTP handler, the handler enqueues small cleanup jobs, and workers delete or archive one unit at a time. That keeps the request fast while preserving a clear retry boundary.
For a small Node.js service, node-cron is the quickest first call. For a system that already needs durable queues, BullMQ is a better local building block. Temporal fits workflows with branching state and long waits.…