Commit Graph
2 Commits
Author SHA1 Message Date
NefelibateLG 3c8e3744c7 Preserve cron deadlines after timer overruns
A cron timerfd read can consume multiple expirations. Advance the
stored deadline by the number of expirations consumed so restarting
the watcher does not re-arm a deadline that was already handled.

Extend cronstart to cover two elapsed deadlines and check that the
restarted watcher keeps its next deadline.

Signed-off-by: NefelibateLG <3453510037@qq.com>
2026-11-26 17:31:20 +08:00
NefelibateLG ae28276f3f Fix restart of a stopped cron watcher
uev_cron_start() on a stopped cron watcher brings it back as a regular
timer, with a timeout made up of parts of the cron schedule.  It calls
uev_timer_start(), which reads the timer fields of the watcher and
creates a monotonic timer.

Restart with uev_cron_set() and the cron schedule instead.
2026-11-16 14:54:48 +01:00