Gateway crashes at startup with NameError: name 'InProcessCronScheduler' is not defined
Environment
- Python 3.14.7 (uv-managed cpython)
- Fresh managed install, cron enabled (default
cron/ state in ~/.hermes)
- Command:
hermes gateway
Symptom
The gateway banner prints, adapters begin connecting, then the process crashes:
Traceback (most recent call last):
File ".../hermes_cli/gateway.py", line 5371, in run_gateway
success = asyncio.run(start_gateway(replace=replace, verbosity=verbosity))
...
File ".../gateway/run.py", line 28757, in start_gateway
isinstance(cron_provider, InProcessCronScheduler)
NameError: name 'InProcessCronScheduler' is not defined
Every gateway start with cron enabled crashes; messaging platforms never finish coming up.
Root cause
start_gateway() resolves the cron scheduler via:
from cron.scheduler_provider import resolve_cron_scheduler # gateway/run.py:28741
but then references the class itself for two isinstance checks:
InProcessCronScheduler is only imported inside a different function scope (_start_cron_ticker, line 28166), so it is not visible here.
Fix
One line — import both symbols where they are used:
from cron.scheduler_provider import InProcessCronScheduler, resolve_cron_scheduler
PR follows.
Gateway crashes at startup with
NameError: name 'InProcessCronScheduler' is not definedEnvironment
cron/state in~/.hermes)hermes gatewaySymptom
The gateway banner prints, adapters begin connecting, then the process crashes:
Every gateway start with cron enabled crashes; messaging platforms never finish coming up.
Root cause
start_gateway()resolves the cron scheduler via:but then references the class itself for two isinstance checks:
InProcessCronScheduleris only imported inside a different function scope (_start_cron_ticker, line 28166), so it is not visible here.Fix
One line — import both symbols where they are used:
PR follows.