The reminder that never came
Your app promises 'We'll remind you in 24 hours'. Nobody has ever received the reminder.
This answers: Why doesn't setTimeout work in my serverless API? No coding needed. 2 quick decisions.
- How a request travels
- Debugging without panic
Checking your access…
Why doesn't setTimeout work in my serverless API?
functions run for one request and stop shortly after responding, so timers scheduled inside them never fire. Store future work as data with a due time, and process it with a (cron) or a queue that retries failures. Check your plan's cron frequency limits.
Breaks at Scheduler: Function stopped; timer died
Why AI tools write this bug
Code written for a long-running server, with timers, is often generated for hosting where it silently stops working.
How to fix it
- Save scheduled work in a table with a due time.
3 more steps, and a prompt that checks your own app for this bug. Part of Pro.
UnlockCommon questions
- Can I keep the function alive longer?
- Only for seconds or minutes, not hours. Use a scheduler for anything later.