mostprodev
mostprodev16mo ago

run code at the start of every hour

I would like the most performant code pls.
3 Replies
mostprodev
mostprodevOP16mo ago
I know I should use a loop/setTimeout (I don't actually know this) But how can I create a list of setTimeouts, and have them never stop? I should do this myself
PugHealer
PugHealer16mo ago
Did you look into a scheduling lib, like Croner? https://croner.56k.guru/usage/
Croner
Usage
Cron for JavaScript and TypeScript
Hexagon
Hexagon16mo ago
I totally agree with @pughealer, Croner would be a perfect fit <:party_deno:1035517691517218847>

Did you find this page helpful?