agentleFS
iapiap/hermes-guide/skills/diagnosing-cron/SKILL.md

diagnosing-cron

Skill6 starsChanged 8 days agoMITView on GitHub

Diagnose Hermes cron job issues — jobs not firing, scheduler dead, wedged fire-claim, timezone issues, and delivery failures.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After applying the fix:

    line 72
  2. Very specific:

    Run hermes gateway restart to bring the gateway (and scheduler) back up, then verify with hermes cron status and hermes cron list.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Diagnosing Cron Jobs

Goal: reduce any cron problem to one concrete fix — a schedule expression, a gateway restart, or a delivery target. Cron jobs are agent sessions that fire on a schedule.

1. Configuration shape

# ~/.hermes/config.yaml
cron:
  allow_agent_scheduling: true   # default: false — allows agent to manage cron jobs

Jobs are created via hermes cron create or the cronjob tool:

hermes cron create "0 9 * * 1-5" \
  "Pull yesterday's commits from the repo at ~/work/project, summarize what changed" \
  --skill git-summary \
  --name "Weekday standup prep" \
  --deliver telegram

2. How to inspect

  • hermes cron status — scheduler health (gateway process, ticker heartbeat, last successful tick)
  • hermes cron doctor — grouped, per-job issues (exits 1 if any finding)
  • hermes cron list — all jobs, states, next_run times
  • hermes cron runs <job_id> --limit 20 — execution ledger (not just the job row)
  • hermes cron run <job_id> — trigger the job immediately (for testing)
  • hermes logs — view recent Hermes logs
  • ~/.hermes/logs/agent.log — scheduler messages
  • ~/.hermes/logs/errors.log — warnings and errors

3. Pitfalls (symptom → cause → fix)

  1. Job not firing — (a) scheduler not running (gateway down); (b) next_run_at parked in the past beyond 15-minute grace window; (c) wedged fire-claim. → Run hermes cron status; check hermes cron doctor; restart gateway (hermes gateway restart).
  2. Job shows last_run_at: null and last_status: error — known issue (#21867): action='run' only set next_run_at = now but didn't execute. → Fixed in v0.21.2+; upgrade Hermes; use hermes cron run <job_id> to test.
  3. Job fires at wrong time — (a) timezone mismatch (cron uses UTC); (b) schedule expression wrong. → Verify cron expression; check system timezone; use hermes cron list to see next_run times.
  4. Job runs but delivery fails — (a) deliver target (telegram/discord/etc.) not configured; (b) token expired; (c) platform API error. → Check deliver target config; verify platform tokens; check hermes logs for delivery errors.
  5. Job runs but produces no output — (a) skill not installed; (b) skill error; (c) model/provider issue. → Check hermes cron runs <job_id> for output; verify skill installed; check model config.
  6. Scheduler dead — (a) gateway not running; (b) ticker heartbeat missing; (c) resource exhaustion. → Run hermes cron status; check hermes gateway status; restart gateway; check system resources.
  7. Job stuck in "running" state — (a) job crashed but state not updated; (b) concurrent execution blocked. → Check hermes cron list for state; restart gateway; check for duplicate jobs.
  8. Agent can't create cron jobs — cron.allow_agent_scheduling not set to true. → Set cron.allow_agent_scheduling: true in config.yaml.

4. Localization workflow

  1. hermes cron status — verify scheduler is alive.
  2. hermes cron doctor — check for per-job issues.
  3. hermes cron list — verify job exists and is active.
  4. hermes cron runs <job_id> --limit 5 — check execution history.
  5. Match the failure: not firing → pitfall 1; wrong time → pitfall 3; delivery fails → pitfall 4.
  6. Apply the fix, hermes cron run <job_id> to test, and verify with hermes cron list.

5. Cross-references

  • hermes-configuration-guide — for $HERMES_HOME resolution and config.yaml structure
  • diagnosing-gateway — for gateway connectivity and platform issues
  • diagnosing-bot-mode — for bot routine/cron integration

Verification

After applying the fix:

hermes cron doctor            # no findings
hermes cron list              # job shows correct state
hermes cron runs <job_id> --limit 5  # recent execution success

Pass: cron doctor reports no findings; job runs successfully.

Fail: re-check the pitfall matched and re-apply the fix.

Report

This skill diagnoses cron job issues — jobs not firing, scheduler dead, wedged fire-claim, timezone issues, and delivery failures. When you run the diagnostic workflow, present findings in the standard format below.

Summary

Your cron job is not firing because the scheduler is not running — the gateway process is down. The cron ticker heartbeat is missing and next_run_at is parked in the past beyond the 15-minute grace window.

Findings

SeverityWhatEvidence
HIGHGateway process is down — scheduler not runninghermes cron status shows scheduler: stopped; hermes gateway status shows gateway: not running
MEDIUMnext_run_at parked in the past beyond grace windowhermes cron list shows next_run_at: 2026-10-07T09:00:00Z (yesterday)

Recommended Fix

Run hermes gateway restart to bring the gateway (and scheduler) back up, then verify with hermes cron status and hermes cron list. If the job still does not fire, run hermes cron run <job_id> to test it manually.

References

  • ~/.hermes/logs/agent.log — scheduler messages
  • ~/.hermes/logs/errors.log — warnings and errors
  • hermes_cli/cron.py — cron CLI commands
  • cron/jobs.py — job execution logic

Facts re-verified 2026-09-21 against upstream source at commit cedf4a3d78675283fa93e4e6ea2d6212bf414667: hermes_cli/cron.py, cron/jobs.py; plus the official docs (hermes-agent.nousresearch.com/docs/user-guide/features/cron). Re-verify before reuse.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.