Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] later.setInterval is advancing 3 hours #25

Open
2 tasks done
eduardokreve opened this issue May 25, 2022 · 1 comment
Open
2 tasks done

[fix] later.setInterval is advancing 3 hours #25

eduardokreve opened this issue May 25, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@eduardokreve
Copy link

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

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and @breejs/later.
@eduardokreve eduardokreve added the bug Something isn't working label May 25, 2022
@eduardokreve
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant