mostprodev
mostprodev15mo ago

run code at the start of every hour

I would like the most performant code pls.
3 Replies
mostprodev
mostprodevOP15mo 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
PugHealer15mo ago
Did you look into a scheduling lib, like Croner? https://croner.56k.guru/usage/
Croner
Usage
Cron for JavaScript and TypeScript
Hexagon
Hexagon15mo ago
I totally agree with @pughealer, Croner would be a perfect fit <:party_deno:1035517691517218847>