Skip to content

switch to cronsim for cron parsing #39

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

Merged
merged 3 commits into from
Dec 31, 2024
Merged

switch to cronsim for cron parsing #39

merged 3 commits into from
Dec 31, 2024

Conversation

st31ny
Copy link
Contributor

@st31ny st31ny commented Nov 6, 2024

Avoid DST related bugs, such as those reported in #7.

CronSim is an alternative implementation of cron parsing in python and was (according to its documentation) explicitly designed to follow Debian's cron implementation, including the DST behavior.

My tests look quite promising and the issues I had noticed vanished using no tz parameter. Passing a zoneinfo timezone to the crontab decorator worked, as well as dateutil.tz.tzlocal().

Unfortunately, this is a breaking change since I had to remove croniter_kwargs, of course.

Avoid DST related bugs.
@gawel gawel merged commit 39f40de into gawel:master Dec 31, 2024
4 checks passed
@pde-rent
Copy link

v2 upgrade with Cronsim broke our prod. They decided to not support the 6th optional expr (seconds) to not diverge from Posix's specs. We'll have to do with 1.8 and croniter for the time being

@st31ny
Copy link
Contributor Author

st31ny commented Jun 27, 2025

v2 upgrade with Cronsim broke our prod. They decided to not support the 6th optional expr (seconds) to not diverge from Posix's specs. We'll have to do with 1.8 and croniter for the time being

True, didn't notice that beforehand. So probably we should try to get this into CronSim. Since seconds would simply add another field, I do not see a reason not to support seconds.

Maybe you could open a bug report at CronSim, @pde-rent ?

@pde-rent
Copy link

pde-rent commented Jun 28, 2025

Maybe you could open a bug report at CronSim, @pde-rent ?

It seems like it was part of the project early on, but removed to remain posix compliant
here is the commit

Now if you were to bring this up again as integration bottleneck, maybe cronsim's contributors would re-consider?

@st31ny
Copy link
Contributor Author

st31ny commented Jun 30, 2025

Now if you were to bring this up again as integration bottleneck, maybe cronsim's contributors would re-consider?

Sure, feel free to open the issue.

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

Successfully merging this pull request may close these issues.

3 participants