From b2d9cef85efe8e9eff0afb160492ef2bc0f7aefe Mon Sep 17 00:00:00 2001 From: yoniebans Date: Thu, 17 Sep 2026 09:53:49 +0200 Subject: [PATCH] fix(cron): W1 restore per-profile gateway install guidance Reported-by: kshitijk4poor (cherry picked from commit f29d812b00c015525601b81e15c938c80a7cfa77) --- hermes_cli/cron.py | 20 +++++++++---------- .../test_cron_satellite_diagnostics.py | 4 +++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hermes_cli/cron.py b/hermes_cli/cron.py index bcb4eb524c..2becfef2cb 100644 --- a/hermes_cli/cron.py +++ b/hermes_cli/cron.py @@ -453,19 +453,17 @@ def cron_status(): active = get_active_profile_name() or "default" except Exception: active = "default" + print("\n To enable automatic execution for this profile:\n" + " hermes gateway install # Install as a user service\n" + " sudo hermes gateway install --system # Linux servers: boot-time system service\n" + " hermes gateway run # Or run in foreground") if active != "default": - print("\n This is a non-default profile. Automatic scheduling requires an awake machine and either:\n" - " 1) The Desktop app open with this profile included in its scheduler, or\n" - " 2) A running default gateway configured to tick this profile:\n" - " hermes --profile default config set gateway.multiplex_profiles true\n" - " hermes --profile default gateway restart\n" + print("\n Alternatives for this named profile:\n" + " Keep the Desktop app open with this profile included in its scheduler and the machine awake, or\n" + " configure a running default gateway to tick this profile:\n" + " hermes --profile default config set gateway.multiplex_profiles true\n" + " hermes --profile default gateway restart\n" " Check: hermes cron status from this profile should show its ticker heartbeat.\n") - else: - print("\n To enable automatic execution:\n" - " hermes gateway install # Install as a user service\n" - " sudo hermes gateway install --system " - "# Linux servers: boot-time system service\n" - " hermes gateway # Or run in foreground") print() _print_active_jobs_summary(list_jobs(include_disabled=False)) diff --git a/tests/hermes_cli/test_cron_satellite_diagnostics.py b/tests/hermes_cli/test_cron_satellite_diagnostics.py index b27a0184a3..a2985c091a 100644 --- a/tests/hermes_cli/test_cron_satellite_diagnostics.py +++ b/tests/hermes_cli/test_cron_satellite_diagnostics.py @@ -64,7 +64,9 @@ def test_status_preserves_profile_health_contract(profile, capsys, monkeypatch, assert "STALLED" in output if mode in {"disabled", "excluded"}: assert "24/7" not in output - assert "awake" in output + assert "hermes gateway install" in output + assert "sudo hermes gateway install --system" in output + assert "hermes gateway run" in output assert "hermes --profile default gateway restart" in output if mode == "external": assert "managed scheduler" in output