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.