In my Node.js application, I use setInterval()
to run a specific function every 1 hour. The function is executed properly for about 25 days, then the timer stops firing.
25 days seems awfully close to Node.js's TIMEOUT_MAX
(2^31 milliseconds ≈ 25 days), but I don't really see why setInterval()
should stop executing after that time.
Update:
I think this may have been caused by the following bug in Node.js: setInterval callback function unexpected halt #22149
setTimeout
instead? – Mashhadcron
/schtasks
/ some other OS-level scheduler instead? – Ioabcron
, although that would require some additional logic in my application. I was hoping there may be some easy fix forsetInterval()
. – AdjudicatesetTimeout
has the exact same problem. – AdjudicatesetInterval()
the only thing it's doing. It could be that your whole process becomes unresponsive perhaps because of a memory or resource leak. – Overburden