JavaScript’s setTimeout function has a limitation of about 25 days due to a 32-bit signed integer representation of time. The author created setBigTimeout to overcome this issue, allowing for longer delays. The package can be found on npm, featuring the ability to chain shorter timeouts to create delays extending up to 84 years or even longer using bigint. While the solution seems simple, thorough testing was not performed over an 84-year period to confirm its functionality. The author invites users to try setBigTimeout and explore the source code for a workaround to JavaScript’s setTimeout limitation.
https://evanhahn.com/set-big-timeout/