Repository navigation
fix: schedule in utc - #1
Merged
Merged
Conversation
ab-ioannis
marked this pull request as ready for review
October 26, 2026 09:33
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
cargo install --locked, so it uses the versions inCargo.lock.Why
Schedules were calculated in the system's local time, and at the end of daylight saving time that can make pocketcron hang. In Europe/Amsterdam on 2026-10-25, the
croncrate treated 03:00 as a time that happens twice, and its schedule kept cycling between 02:01 and 03:00. The loop inmainwaits for a run time after "now", which never comes. pocketcron then uses 100% of a CPU core and stops starting jobs. Before it hung, it had also skipped the first of the two 02:00–02:59 hours.Upgrading
crondoesn't help yet: the upstream fix (zslayton/cron#145) isn't in a release, and 0.17.0 hangs the same way. Scheduling in UTC avoids clock changes entirely.Behaviour change
Crontab times now always mean UTC. On systems that already run in UTC, nothing changes. On other systems, jobs shift by the UTC offset and no longer follow daylight saving time.
cargo installwithout--lockedignoredCargo.lockand could pick newer dependency versions. The image now builds with the locked versions, which are the ones tested below.Testing
cargo build --locked,cargo fmt --checkandcargo clippyare all clean.TZ=Europe/Amsterdamacross 2026-10-25, 2027-03-28 and 2027-10-31: no hang, and every UTC hour got all its runs. The same replay with the old code hangs at 2026-10-25 02:00 UTC.TZ=Europe/Amsterdam: it ran exactly on the minute.