later icon indicating copy to clipboard operation
later copied to clipboard

[fix] later.setInterval is advancing 3 hours

Open eduardokreve opened this issue 3 years ago • 1 comments

Describe the bug

  • Later version: 4.1.0
  • Node.js version: v16.13.1
  • OS & version: "Debian GNU/Linux 9 (stretch)" / "Debian GNU/Linux 10 (buster)"

I'm using the following code snippet to schedule a routine that runs daily on the same hour later.parse.recur().every(1).dayOfMonth().on(10).hour().on(33).minute(); through the later.setInterval

Actual behavior

The execution takes place well for 2 days, but in the 3rd execution it is executed 3 hours in advance.

...

Expected behavior

I expect setInterval to run daily at the same time every day

...

Code to reproduce


let routine = later.parse.recur().every(1).dayOfMonth().on(10).hour().on(33).minute();

//JSON.stringify -> {"schedules":[{"D":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"h":[10],"m":[33]}],"exceptions":[]}

later.setInterval(function() {execRoutine(data)}, routine, timeZone); //timezone = "America/Sao_Paulo"
...

Checklist

  • [x] I have read the documentation.
  • [x] I have tried my code with the latest version of Node.js and @breejs/later.

eduardokreve avatar May 25 '22 12:05 eduardokreve

I have several routines scheduled this way, and only a few had no problem executing in advance.

eduardokreve avatar May 25 '22 13:05 eduardokreve