Simple question, I want to set 24 or 12 hours timeout in Node.js
to periodically (once or twice a day) check some db data and clean suspicious garbage, if any.
Is there any possible problems or performance issues, caused by setting huge timeout, that i need to be aware of? I don't mind if it's not exact 12-24hr in ms, and don't mind loosing this timeout on server crash, as I will run same garbage collector on server startup anyway.
Conclusion:
- I'm not using native OS cron to run separate script as I need to access current Node.js process data inside this script.
- In the end I decided to use https://www.npmjs.com/package/cron package for its ability to shedule at specific time (presumably on time of low server load).
- Thanks everyone for quick responses!