hermes - 💡(How to fix) Fix Bug: cronjob run 无法实际触发执行 (job stuck in state: scheduled) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16612Fetched 2026-04-28 06:52:12
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

  • Transition last_status to ok (or show a specific error).
  • python -c "import croniter; print('OK')" runs without error.

Code Example

{
  "success": true,
  "job": {
    "job_id": "cb7bb97c08c2",
    "state": "scheduled",
    "next_run_at": "2026-04-28T02:53:48...",
    "last_run_at": null,
    "last_status": null
  }
}

---

{
  "success": true,
  "job": {
    "job_id": "cb7bb97c08c2",
    "state": "scheduled",
    "next_run_at": "2026-04-27T22:54:32...",
    "last_run_at": null,
    "last_status": null
  }
}
RAW_BUFFERClick to expand / collapse

Bug: cronjob run command fails to trigger execution (leaves job stuck in state: scheduled)

Environment

  • Hermes Agent Version: latest/main
  • Python: 3.13.11 (Miniconda3)
  • System Python: 3.9.6
  • croniter version: 6.2.2
  • Platform: MacOS

Describe the bug

I attempted to manually trigger a newly created cron job using the cronjob run command. Although the API returns success: true, the job's last_run_at and last_status fields remain null. The job is stuck in state: scheduled and is never actually executed.

This also happens when using schedule: "every 1m" to force quick execution—it simply never triggers.

Steps To Reproduce

  1. Create a cron job via API (e.g., cronjob create).
    • Prompt: "test news briefing..."
    • Schedule: every 240m
    • Response shows "state": "scheduled", "next_run_at": "2026-04-28T02:53..."
  2. Execute cronjob run --job_id [job_id].
  3. Observe the state.

Expected behavior

The command should either:

  • Transition last_run_at to the current timestamp.
  • Transition last_status to ok (or show a specific error).
  • At least transition state to running immediately.

Actual behavior

The API command returns success: true, but inspecting the job state immediately after shows no changes. The job sits idle forever in state: scheduled with last_run_at: null.

API Response Snippets

cronjob create response:

{
  "success": true,
  "job": {
    "job_id": "cb7bb97c08c2",
    "state": "scheduled",
    "next_run_at": "2026-04-28T02:53:48...",
    "last_run_at": null,
    "last_status": null
  }
}

cronjob run response (after manual trigger):

{
  "success": true,
  "job": {
    "job_id": "cb7bb97c08c2",
    "state": "scheduled",
    "next_run_at": "2026-04-27T22:54:32...",
    "last_run_at": null,
    "last_status": null
  }
}

Pre-investigation (Environment)

  • Verified Python environment is healthy.
  • Verified croniter is correctly installed (v6.2.2) and functioning.
  • python -c "import croniter; print('OK')" runs without error.
  • The bug seems isolated to the scheduler triggering mechanism.

Additional Info

If there is a Discord or WeChat channel for reporting Hermes bugs, please point me there. This might be a blocking issue for the cron scheduling feature.

extent analysis

TL;DR

The cronjob run command may not be properly triggering job execution due to a potential issue with the scheduler's triggering mechanism.

Guidance

  • Verify that the cronjob run command is correctly formatted and that the --job_id parameter is being passed correctly.
  • Check the scheduler's configuration to ensure that it is set up to trigger jobs manually using the cronjob run command.
  • Investigate the scheduler's logs to see if there are any error messages or warnings that could indicate why the job is not being triggered.
  • Test the cronjob run command with a different job or schedule to see if the issue is specific to this particular job or schedule.

Example

No code snippet is provided as the issue seems to be related to the scheduler's configuration or triggering mechanism rather than a code issue.

Notes

The issue seems to be isolated to the scheduler's triggering mechanism, and the croniter library and Python environment have been verified to be functioning correctly.

Recommendation

Apply workaround: Investigate alternative methods for triggering cron jobs, such as using a different command or scheduling tool, until the issue with the cronjob run command is resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The command should either:

  • Transition last_run_at to the current timestamp.
  • Transition last_status to ok (or show a specific error).
  • At least transition state to running immediately.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING