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

Scheduler: add daily events #1558

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

T-101
Copy link

@T-101 T-101 commented Sep 26, 2023

Extend Scheduler plugin to run commands daily

@progval
Copy link
Owner

progval commented Sep 26, 2023

@daily name HH:MM:SS <command> is equivalent to @repeat --delay [seconds HH:MM:SS] name [seconds 1d] <command>, and shares its main issue: the event runs every 86400 seconds instead of every day, which does not behave as expected in presence of DST and leap seconds.

In order to address this, you need to add a new type of scheduler events for events which happens on a fixed clock (every X days, monthly, yearly, ...) and compute the next tick every time.

(Also, avoid loops to compute time, it uses more CPU and is more error prone, eg. this one does not terminate when a user provides 12:00:60 as time_of_day)

@jlu5 jlu5 changed the title Feature/daily scheduler events Scheduler: add daily events Oct 7, 2023
@progval progval changed the base branch from testing to master May 5, 2024 15:53
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.

2 participants