← All recipes

Daily Hermes Auto-Update and Health Report on Windows

Status: Draft

Last tested: 2026-06-02

Works with: Hermes Agent on Windows, Windows Scheduled Tasks

Category: Hermes Agent / Windows

Difficulty: Intermediate

Problem

Hermes Agent can be updated manually, but a Windows install can become stale or unhealthy if nobody checks it regularly. You want an early-morning job that updates Hermes, runs diagnostics, restarts the Gateway, and sends a report.

What you will build

A Windows Scheduled Task that runs a Python health script every morning and sends a PASS/WARN/FAIL report to Discord.

Requirements

Quick version

schtasks /Create /TN "Hermes_Auto_Update_Health" ^
  /TR "C:\Path\To\hermes-auto-update-health.cmd" ^
  /SC DAILY /ST 03:15 /F

Step-by-step setup

Step 1: Create a health script

Create a Python script that:

Step 2: Create a CMD wrapper

@echo off
setlocal
set "HERMES_HOME=C:\Users\YourUser\AppData\Local\hermes"
set "PYTHONIOENCODING=utf-8"
cd /d "C:\Users\YourUser\AppData\Local\hermes\hermes-agent"
"C:\Users\YourUser\AppData\Local\hermes\hermes-agent\venv\Scripts\python.exe" "C:\Users\YourUser\AppData\Local\hermes\scripts\hermes-auto-update-health.py" >> "C:\Users\YourUser\AppData\Local\hermes\logs\hermes-auto-update-health-scheduled.log" 2>&1
exit /b %ERRORLEVEL%

Step 3: Register the scheduled task

schtasks /Create /TN "Hermes_Auto_Update_Health" /TR "C:\Users\YourUser\AppData\Local\hermes\scripts\hermes-auto-update-health.cmd" /SC DAILY /ST 03:15 /F

Step 4: Test it manually

schtasks /Run /TN "Hermes_Auto_Update_Health"
schtasks /Query /TN "Hermes_Auto_Update_Health" /FO LIST /V

Verification

Troubleshooting

| Symptom | Likely cause | Fix |

| --- | --- | --- |

| Update says `hermes.exe` is running | An interactive Hermes CLI/Desktop session is open | Close it or let the next morning run handle it |

| npm audit command not found | Windows subprocess cannot resolve Git Bash `npm` shim | Use `C:\Program Files\nodejs\npm.cmd` |

| Report not sent | Discord token/channel missing | Check `.env` values and bot permissions |

| Gateway not running after update | Scheduled task or gateway startup failed | Run `hermes gateway status` and inspect logs |

Optional upgrades

Disclosure

This recipe is a genericized version of a real Windows Hermes maintenance workflow. Replace all paths and IDs with your own values.