Skip to content

feat(cron): warn when gateway not running on cron create/list - #51696

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-500d44bd
Jun 24, 2026
Merged

feat(cron): warn when gateway not running on cron create/list#51696
teknium1 merged 1 commit into
mainfrom
hermes/hermes-500d44bd

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

hermes cron create now warns when the gateway isn't running, so users learn up front that their job won't fire.

The cron ticker runs only inside the gateway (_start_cron_ticker) — there is no standalone cron daemon. With no gateway running, next_run_at passes but jobs never fire and last_run_at stays null. Manual hermes cron run bypasses the ticker and appears to work, masking the cause. This is the most common cron "jobs never fired" report (#51038).

cron list already showed this warning; cron create (the moment the user is most likely to hit it) did not.

Changes

  • hermes_cli/cron.py: extract the warning into _warn_if_gateway_not_running(); call it from cron_create and cron_list (dedup); add a hermes cron status pointer. Silent when a gateway is running — the gateway /cron path is unaffected.
  • tests/hermes_cli/test_cron.py: regression guards — create/list warn when gateway absent, silent when present.

Validation

Gateway down Gateway up
cron create warns silent
cron list warns silent

Verified live: real find_gateway_pids() returned a running PID → no false nag; forced-absent → warning renders. Targeted suite 7/7 green via scripts/run_tests.sh.

Note on #51038

The reported scheduler defect (polling too slow / no catch-up) does not exist: the ticker polls every 60s and daily jobs already get a 2h catch-up grace window (verified E2E — a daily job 13–23 min late fires; >2h fast-forwards). The real cause was a gateway that was never started. This PR closes the UX gap that led to the report.

Infographic

Cron warn when gateway is down

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-500d44bd vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11171 on HEAD, 11171 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5900 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request comp/cron Cron scheduler and job management comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jun 24, 2026
@teknium1
teknium1 merged commit 78e122a into main Jun 24, 2026
27 checks passed
@teknium1
teknium1 deleted the hermes/hermes-500d44bd branch June 24, 2026 06:29
pai-scaffolde pushed a commit to pai-scaffolde/hermes-agent that referenced this pull request Jun 28, 2026
…search#51696)

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (NousResearch#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…search#51696)

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (NousResearch#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…search#51696)

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (NousResearch#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…search#51696)

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (NousResearch#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…search#51696)

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (NousResearch#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…search#51696)

The cron ticker only runs inside the gateway (_start_cron_ticker); there
is no standalone cron daemon. When the gateway isn't running, next_run_at
passes but jobs never fire and last_run_at stays null — and manual
'hermes cron run' (which bypasses the ticker) appears to work, masking
the real cause. This is the most common cron support report (NousResearch#51038).

cron list already warned; extend the same warning to cron create (the
moment the user is most likely to hit this) via a shared helper, and add
a pointer to 'hermes cron status'. Silent when a gateway is running, so
the gateway /cron path is unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants