R
R
RunFMe2015-03-14 20:30:41
JavaScript
RunFMe, 2015-03-14 20:30:41

How to perform an action on a timer?

There are records in the table, after 10 hours you need to change each record, how to implement this, given that there is a separate conversion time for each record? setTimeout does not seem to be suitable, because A large number of timers load the processor (or maybe not, enlighten me).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
TekVanDo, 2015-03-14
@TekVanDo

Implement a queue, every n minutes the cron twitches a script that looks to see if there are records that need to be changed, you can also set the maximum operating time so as not to load the processor heavily.

D
dtestyk, 2015-03-15
@dtestyk

you can set a timer before changing the record to change the next

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question