I have a function that runs every 24 hours. It emits an event. But if I restart the server, all listeners are gone. What can be done?

And listeners navesivvyatsya by some logic? When you first start the server they are not?

Дмытрык2022-01-17 20:23:10

Please clarify your specific problem or provide more details on what exactly you need. In its current form, it's hard to understand exactly what you're asking.

Дух сообщества2022-01-17 20:24:59

store the time of the last reload in a file/database and look not at "setInterval(...)" but at the time of the last send and whether "N hours" have elapsed

Ceri2022-01-18 06:26:10