Monday, 15 February 2010

Use Javascript Timer in Node.Js Script to fire an event at certain time -


I have 40 or more timers in my node script (one timer for per connection) and to count the time Call function For the second job, I want to call a function at 23:59; So I have two solutions:

  1. Use another java script timer to check time and call your function at 23:59.
  2. Use Linux schedule to emit an event at 23: 59.

Which is logical? Is there any other solution?

Take a look at the node-cron module, I used it to schedule node explorer Recurring task first:


No comments:

Post a Comment