I need to repeat a backend task every hour. I've read that node-cron is good for that. But why not just setInterval(). What is the difference?
Using setInterval()
only allows you to set a repetition by a fixed value of milliseconds. nothing else.
With cron-node
you are much more flexible, because you can set your interval with the full variety of time parts. Seconds, minutes, hours and so forth. It's a real scheduler.