D
D
Dmitry Kuznetsov2021-08-09 08:36:51
Node.js
Dmitry Kuznetsov, 2021-08-09 08:36:51

What is the best way to implement timer commands in node.js?

Good afternoon. There is a game project in which you need to perform some action from the server side every n-time (minutes, hours, days, etc.), such as CRON. What is the best way to implement this functionality - what libraries, modules, etc. better to use?

Example: Every hour all players who are currently online are given a certain number of items / gold, etc.

PS: I have never encountered this on NodeJS, so I'm asking. I also ask you not to point out the standard features of NodeJS, if any.

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2021-08-09
@dima9595

Task queues
https://habr.com/en/post/458608/
You throw a task at the right time and it is executed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question