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:Jump to solution
Just change the import syntax for require and remove the types. The code stays the same.
4 Replies