lholden / job_scheduler

A simple cron-like job scheduling library for Rust.
Apache License 2.0
196 stars 34 forks source link

Day of Week, expression "1-5" results in execution on Sunday? #29

Open Thorongil80 opened 2 years ago

Thorongil80 commented 2 years ago

Hi,

I use the expression "1-5" for weekdays for a job running at 1pm. After I schedule, when I check on Friday after the execution with time_till_next_job and calculate, I get an execution on Sunday!

For cron, the values "0" and "7" designate sundays.

Is there a bug with array start or something? Can you verify this on your side?

Best Regards, Thomas

BlackDex commented 1 year ago

Not something that can be fixed (easily) by other crates then within the cron crate it self. But (as mentioned on the linked issue), that isn't wise to do, as it will cause issues with already configured jobs.