hermes-agent/cron
Teknium d313a3b7d7
fix: auto-repair jobs.json with invalid control characters (#3537)
load_jobs() uses strict json.load() which rejects bare control characters
(e.g. literal newlines) in JSON string values. When a cron job prompt
contains such characters, the parser throws JSONDecodeError and the
function silently returns an empty list — causing ALL scheduled jobs
to stop firing with no error logged.

Fix: on JSONDecodeError, retry with json.loads(strict=False). If jobs
are recovered, auto-rewrite the file with proper escaping via save_jobs()
and log a warning. Only fall back to empty list if the JSON is truly
unrecoverable.

Co-authored-by: Sebastian Bochna <sbochna@SB-MBP-M2-2.local>
2026-03-28 08:15:31 -07:00
..
__init__.py docs: clarify gateway service scopes (#1378) 2026-03-14 21:17:41 -07:00
jobs.py fix: auto-repair jobs.json with invalid control characters (#3537) 2026-03-28 08:15:31 -07:00
scheduler.py fix(cron): prevent recurring job re-fire on gateway crash/restart loop (#3396) 2026-03-27 08:02:58 -07:00