Node.js · Senior · Question 68 of 75

What is a reasonable way to run scheduled tasks (cron) in a Node.js service with several instances?

Explanation

With a timer in each of 5 instances the job runs 5 times. Jobs should still be idempotent in case a run is repeated.

Further reading

Problem with a question

Node.js · Senior · question 68

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz