Your DO will stay active after the last request up to 1-2 minutes if you have some `setTimeout/setIn

Your DO will stay active after the last request up to 1-2 minutes if you have some
setTimeout/setInterval
scheduled, otherwise it will be evicted after 10 seconds.
If you want to keep it running for longer you can schedule an alarm to run every few seconds doing nothing other than checking if your long running tasks are done and rescheduling itself if not yet. Alarms count as normal requests so they reset the timer for eviction.
Was this page helpful?