Simple scheduler for running batch tasks on node.js
Simple scheduler for node.js. I wrote this as I have to process several thounsand batch jobs sitting between three different network services. I had not to send too many tasks to a certain service due to various reasons, while if there was a temporary downtime / error, the task needed to be rescheduled. The simple-schedule module is the result of this challenge.
Either manually clone this repository into your node_modules directory, or the recommended method:
npm install simple-schedule
var schedule = ;schedule; // Declare a new schedulertry// Push entries to the schedulerschedule;schedule;schedule;// Dispatches 2 tasks every 2 seconds, executing the given callback// schedule.dispatch callback, time interval, scheduler, number of tasks, execution callback;catch e// Throws an error if the scheduler name is invalidconsole;