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
Favna9mo ago
Just change the import syntax for require and remove the types. The code stays the same.
./Ticker
./TickerOP9mo ago
is this part necessary? also do I need to make a redis database?
No description
Favna
Favna9mo ago
Yes and yes
./Ticker
./TickerOP9mo ago
got it, thanks
Want results from more Discord servers?
Add your server