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

Weekly with Steps not working #34

Closed
npappireddy opened this issue Jan 25, 2021 · 2 comments
Closed

Weekly with Steps not working #34

npappireddy opened this issue Jan 25, 2021 · 2 comments
Labels

Comments

@npappireddy
Copy link

npappireddy commented Jan 25, 2021

A Step is working with every date part place holder. But the Day of the week place holder not considering */5 (with n number of Steps ahead when an weekly interval is given)

@WorldIsM
Copy link

WorldIsM commented May 12, 2021

Same with hours * */1 * * * *

@odinserj
Copy link
Member

A Step is working with every date part place holder. But the Day of the week place holder not considering */5 (with n number of Steps ahead when an weekly interval is given)

Unfortunately this problem relates to the format itself, please see this section on Wikipedia:

Note that frequencies in general cannot be expressed; only step values which evenly divide their range express accurate frequencies (for minutes and seconds, that's /2, /3, /4, /5, /6, /10, /12, /15, /20 and /30 because 60 is evenly divisible by those numbers; for hours, that's /2, /3, /4, /6, /8 and /12); all other possible "steps" and all other fields yield inconsistent "short" periods at the end of the time-unit before it "resets" to the next minute, second, or day; for example, entering */5 for the day field sometimes executes after 1, 2, or 3 days, depending on the month and leap year; this is because cron is stateless (it does not remember the time of the last execution nor count the difference between it and now, required for accurate frequency counting—instead, cron is a mere pattern-matcher).

Same with hours * */1 * * * *

6-part expressions in Cronos mean Second Minute Hour Day Month DayOfWeek, so */1 in this expression relates to minutes, not hours. And more over, the expression itself is the equivalent of "every minute".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants