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

Schedule "From now" negative output #378

Open
W1zzardTPU opened this issue Jun 30, 2024 · 2 comments · May be fixed by #425
Open

Schedule "From now" negative output #378

W1zzardTPU opened this issue Jun 30, 2024 · 2 comments · May be fixed by #425
Labels
bug Something isn't working
Milestone

Comments

@W1zzardTPU
Copy link

Looks like a rounding error

│ 2024-06-30T17:25:51.406207133Z 2024/06/30 17:25:51 using configuration file: /etc/resticprofile/profiles.yaml                                                                                                                               │
│ 2024-06-30T17:25:51.415401032Z                                                                                                                                                                                                              │
│ 2024-06-30T17:25:51.415412702Z Analyzing backup schedule 1/1                                                                                                                                                                                │
│ 2024-06-30T17:25:51.415416271Z =================================                                                                                                                                                                            │
│ 2024-06-30T17:25:51.415419241Z   Original form: *:00,05,10,15,20,25,30,35,40,45,50,55                                                                                                                                                       │
│ 2024-06-30T17:25:51.415421761Z Normalized form: *-*-* *:00,05,10,15,20,25,30,35,40,45,50,55:00                                                                                                                                              │
│ 2024-06-30T17:25:51.415423711Z     Next elapse: Sun Jun 30 17:25:00 UTC 2024                                                                                                                                                                │
│ 2024-06-30T17:25:51.415425701Z        (in UTC): Sun Jun 30 17:25:00 UTC 2024                                                                                                                                                                │
│ 2024-06-30T17:25:51.415427881Z        From now: -51s left                                                                                                                                                                                   │
│ 2024-06-30T17:25:51.415429911Z                                                                                                                                                                                                              │
│ 2024-06-30T17:25:51.415557488Z 2024/06/30 17:25:51 scheduled job default/backup created                                                                                                                                                     │
│ 2024-06-30T17:25:51.420512803Z time="2024-06-30T17:25:51Z" level=info msg="read crontab: /etc/crontab"                                                                                                                                      │
@creativeprojects
Copy link
Owner

Hey!

Are you using the cron scheduler right? not systemd?

If yes I think the rounding error is likely to be there:

next := from.Truncate(time.Minute) // truncate all the seconds

Thanks for the report 👍🏻

@creativeprojects creativeprojects added the bug Something isn't working label Jun 30, 2024
@W1zzardTPU
Copy link
Author

Are you using the cron scheduler right? not systemd?

Yessir, " scheduler: crontab:-:/etc/crontab"

creativeprojects added a commit that referenced this issue Oct 28, 2024
@creativeprojects creativeprojects added this to the v0.30.0 milestone Oct 28, 2024
@creativeprojects creativeprojects linked a pull request Nov 1, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants