Skip to content

[14.0] Add module cron_daylight_saving_time_resistant - #2289

Merged
OCA-git-bot merged 8 commits into
OCA:14.0from
akretion:14-cron_daylight_saving_time_resistant
Apr 4, 2024
Merged

[14.0] Add module cron_daylight_saving_time_resistant#2289
OCA-git-bot merged 8 commits into
OCA:14.0from
akretion:14-cron_daylight_saving_time_resistant

Conversation

@florian-dacosta

Copy link
Copy Markdown
Contributor

The module allows to configure crons so they always run at the same hour, no matter the timezone and the change of hours.
For instance, if you are in Brussels and you have a cron that run every days at 11H (local time), when swtiching from summer time to winter time, the cron will be planned for the next day at 10H (local time)
At the contrary when switching from winter time to summer time, the cron that was configured to run at 11H will be planned for 12H.
If it is important that the cron always run at the same hour no matter the change of time, then you can check the box "daylight_saving_time_resistant" on the cron.

@manengel

manengel commented Jun 7, 2022

Copy link
Copy Markdown

The cron job required for this does take the user's time zone into account, does it?

@thomaspaulb

Copy link
Copy Markdown
Contributor

It does look like it takes the user into account when creating an env to take the timezone from?

I like this a little bit better than this one, because it doesn't write to other cron jobs, it only writes to the next execution time of the current cron job, which seems less invasive to me and less prone to create conflict issues with other cron jobs.

@thomaspaulb thomaspaulb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

@thomaspaulb

thomaspaulb commented Nov 1, 2023

Copy link
Copy Markdown
Contributor

@NL66278 Maybe another review?

@NL66278

NL66278 commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

Normally I would say that code should document itself, but I have a hard time understanding how this works. So some documentation of what happens seems to be in order. Then I might be able to do a proper review.

@thomaspaulb

Copy link
Copy Markdown
Contributor

@hparfr @clementmbr Since you reviewed the 16.0 version, maybe you can check if this one can be merged too?

@gurneyalex

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-2289-by-gurneyalex-bump-nobump, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 09f7b04 into OCA:14.0 Apr 4, 2024
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at ea93b08. Thanks a lot for contributing to OCA. ❤️

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants