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

cron ticks are slightly less than ideal #3160

Open
nwf opened this issue Jun 13, 2020 · 2 comments
Open

cron ticks are slightly less than ideal #3160

nwf opened this issue Jun 13, 2020 · 2 comments
Labels
enhancement minutae Unlikely to change anyone's quality of life stale

Comments

@nwf
Copy link
Member

nwf commented Jun 13, 2020

  • cron_handle_tmr resets os_timer_arm every call to tick on the next minute boundary. It might be better to keep the list of scheduled entities sorted by next firing time and set the timer to fire when the leading queue entry would fire (and to re-arm it when a schedule changes or an entry is created). Or perhaps we don't even need a list, and every entry could have its own backing timer.

  • The cron module is not informed of rtctime changes, and so will be in for a surprise if sntp has stepped the clock since cron armed its timer. As a result, entry firing my be delayed arbitrarily (and, in fact, entries may never fire). In an ideal world, entries would probably degrade to rate-monotone firing even if the clock is jumping around (that is, firing with a period at most one minute larger than their scheduled interval, as they would compute the elapsed time until next firing upon each firing), while a stable clock would synchronize phase and frequency of schedules with the wall clock, and a periodically stepped clock would take on some middle behavior between those two extremes,

@nwf nwf added enhancement minutae Unlikely to change anyone's quality of life labels Jun 13, 2020
@stale
Copy link

stale bot commented Jun 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 9, 2021
@nwf nwf removed the stale label Jun 9, 2021
@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement minutae Unlikely to change anyone's quality of life stale
Projects
None yet
Development

No branches or pull requests

1 participant