4 ms·
Long runtime apps, calendar-esque scheduling, etc al@ seem like things that could reasonably* hit that * specifically they could reasonably end up with time st
by olliej 8y ago
Long runtime apps, calendar-esque scheduling, etc al@ seem like things that could reasonably* hit that
* specifically they could reasonably end up with time steps >= 2^31ms. Even if the design isn’t ideal it should still work
- avip 8y agoThat does not sound like a sound implementation.
- zamalek 8y agoThe bug occurs if your process reaches ~25 days, period. Regardless of the interval that you set - it could be 1ms and still fail. It has been 'fixed' and is now ~49 days, but setTimeout does not throw and so you have to rely on your process crashing due to some other condition. If you have setTimeout anywhere in your code (including packages), you will need to force it to crash/exit once a month. The implementation of setTimeout in Node is not sound.
- olliej 8y agoIt’s perfectly reasonable: Run task every 4 weeks: Onesecond = 1000; Oneminute = 60 * oneSecond; oneHour = 60 * oneMinute; oneDay = 24 * oneHour; oneWeek = 7 * oneDay; Then from that reasonable set of definitions you make a even fire in 4 * oneWeek. Maybe you aren’t even using setTimeout, but you’re using a timer library that internally is just using aetTineout (what does node have besides setTimeout by the way?). You end up with an accumulation of individually reasonable questions that don’t work, for no obvious reason. That said someone else is saying this actually is a “timers stop working in general after X days”, rather than just long lifetime timers, which makes this even more obtuse.
- truth_seeker 8y agoIMHO Scheduling the task beyond 12-24 hours, especially when it requires the Runtime timers overhead won't be practical.