mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
compute_next_run() ignored the last_run_at parameter for cron-type schedules, always computing from _hermes_now() instead. This was inconsistent with interval jobs which DO use last_run_at as the anchor. After a crash or restart, cron jobs would compute next_run_at from the arbitrary restart time rather than the actual last execution time. While the stale detection in get_due_jobs() catches most cases, using last_run_at as the croniter base eliminates edge cases and makes the behavior consistent across schedule types. Salvaged from #9014 (authored by @beenherebefore) onto current main. The original PR branch was 2+ weeks stale and would have reverted substantial unrelated work (jobs_file_lock, workdir/context_from/ enabled_toolsets, issue #16265 state=error recovery). Kept just the 7-line substantive fix and the regression test. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| jobs.py | ||
| scheduler.py | ||