Scheduled Tasks with Common JS

I am looking to do a task every 2 minutes, I want to use scheduled tasks but seems like all the examples are in Typescript/ESM, can anyone show or explain how to use it with CommonJS?
Solution:
Just change the import syntax for require and remove the types. The code stays the same.
Jump to solution
4 Replies
Solution
Favna
Favna6mo ago
Just change the import syntax for require and remove the types. The code stays the same.
./Ticker
./Ticker6mo ago
is this part necessary? also do I need to make a redis database?
No description
Favna
Favna6mo ago
Yes and yes
./Ticker
./Ticker6mo ago
got it, thanks
Want results from more Discord servers?
Add your server