Since setInterval (and less so setTimeout) are not guaranteed to run exactly after the specified time they can start to drift after a bit. This implementation does calculate the next runtime of the everyhour job after every run to make sure that a drift is not affecting it.
Since
setInterval
(and less sosetTimeout
) are not guaranteed to run exactly after the specified time they can start to drift after a bit. This implementation does calculate the next runtime of theeveryhour
job after every run to make sure that a drift is not affecting it.