S
S
Sergo Sergo2015-05-19 18:35:35
Node.js
Sergo Sergo, 2015-05-19 18:35:35

What is the best way to implement a repetition every 2.5 hours?

Good afternoon, I need the server on the node to perform certain actions every 2.5 hours. But I don’t know how to do this, it seems to me that the option with ordinary timers is not the best.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Savostin, 2015-05-19
@sergo_serga

Take some module and see - everything is done on setTimeout...

A
Alexander Prozorov, 2015-05-20
@Staltec

If you implement such calls in the application process itself via setTimeout (), then you have to take into account the fact that the process may abnormally terminate its work and be restarted.
For such large periods, it is better to pull a separate task-handler with the crown and not take a steam bath.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question