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

croniter 6th param should be year but it's seconds. #176

Closed
HaloKo4 opened this issue Oct 7, 2021 · 2 comments
Closed

croniter 6th param should be year but it's seconds. #176

HaloKo4 opened this issue Oct 7, 2021 · 2 comments

Comments

@HaloKo4
Copy link

HaloKo4 commented Oct 7, 2021

#76 is closed but it's not resolved. In that issue itself there are several examples where the 6th param means seconds when it should be years
I'm copying it here:

base = datetime(2010, 1, 25, 4, 46)
iter = croniter('* * * * * */5', base)
print(iter.get_next(datetime))
print(iter.get_next(datetime))
print(iter.get_next(datetime))

Prints:

2010-01-25 04:46:05
2010-01-25 04:46:10
2010-01-25 04:46:15

Also see discussion in Apache Airflow apache/airflow#16107
pointing to another reproduce example on apache/airflow#16107 (comment)

@kiorky kiorky closed this as completed Oct 8, 2021
@kiorky kiorky reopened this Oct 8, 2021
@kiorky
Copy link
Collaborator

kiorky commented Oct 8, 2021

wait that was contributed a long time ago and was related to seconds repeatitions, and not part of any official spec.

croniter mostly sticks with the original 5fields cron format with some variations.

There are some bits with 6fields (seconds): https://github.com/taichino/croniter#about-second-repeats but not a full support.

PR are welcomes ;-)

@kiorky
Copy link
Collaborator

kiorky commented Oct 8, 2021

closing as a reopening of the former bug that i mis read.

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

No branches or pull requests

2 participants