K
K
komigor2021-05-08 11:58:05
Node.js
komigor, 2021-05-08 11:58:05

How to do something at the specified time?

I need to implement such logic that a set of tasks comes to the Node.js server and then they are executed at a certain time (this may be in a day, or a month, or six months later). I have already accepted them and saved them to the database, but how can I make sure that they are executed when necessary?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-05-08
@komigor

cron We
save jobs in the database.
According to the crown, for example, once a minute (depending on the frequency of tasks), we pull the script that looks into the database, selects the appropriate tasks and executes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question