hermes - 💡(How to fix) Fix Cron accepts one-shot jobs in the past and leaves them scheduled with no next_run_at

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…

A one-shot cron job can be created with a run_at timestamp that is already in the past. Hermes accepts it, but the job becomes a zombie:

  • enabled: true
  • state: scheduled
  • repeat: once / completed: 0
  • next_run_at: null
  • last_run_at: null
  • last_status: null

It never fires and shows up later as a stuck scheduled job.

Error Message

  1. Reject one-shot schedules in the past at creation/update time with a clear error.

Root Cause

A one-shot cron job can be created with a run_at timestamp that is already in the past. Hermes accepts it, but the job becomes a zombie:

  • enabled: true
  • state: scheduled
  • repeat: once / completed: 0
  • next_run_at: null
  • last_run_at: null
  • last_status: null

It never fires and shows up later as a stuck scheduled job.

Code Example

{
  "id": "c8d893b0a214",
  "name": "recordatorio-macbook-sequoia-manana-9",
  "schedule_display": "once at 2026-05-10 09:00",
  "repeat": { "times": 1, "completed": 0 },
  "enabled": true,
  "state": "scheduled",
  "created_at": "2026-05-12T19:51:43.338068+02:00",
  "next_run_at": null,
  "last_run_at": null,
  "last_status": null
}
RAW_BUFFERClick to expand / collapse

Summary

A one-shot cron job can be created with a run_at timestamp that is already in the past. Hermes accepts it, but the job becomes a zombie:

  • enabled: true
  • state: scheduled
  • repeat: once / completed: 0
  • next_run_at: null
  • last_run_at: null
  • last_status: null

It never fires and shows up later as a stuck scheduled job.

Repro / observed example

On a live Hermes gateway, a reminder job was present with:

{
  "id": "c8d893b0a214",
  "name": "recordatorio-macbook-sequoia-manana-9",
  "schedule_display": "once at 2026-05-10 09:00",
  "repeat": { "times": 1, "completed": 0 },
  "enabled": true,
  "state": "scheduled",
  "created_at": "2026-05-12T19:51:43.338068+02:00",
  "next_run_at": null,
  "last_run_at": null,
  "last_status": null
}

The job was created after its scheduled time, so it had no valid future execution.

Expected behavior

One of these would be fine:

  1. Reject one-shot schedules in the past at creation/update time with a clear error.
  2. Mark them immediately as expired/missed/disabled instead of scheduled.
  3. If intentional, expose an explicit missed status so health checks do not treat it as a live scheduled job.

Why it matters

The current state is misleading: it looks scheduled/enabled but can never run. Health checks/heartbeat jobs then report it as stuck, and users have to manually remove it.

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

One of these would be fine:

  1. Reject one-shot schedules in the past at creation/update time with a clear error.
  2. Mark them immediately as expired/missed/disabled instead of scheduled.
  3. If intentional, expose an explicit missed status so health checks do not treat it as a live scheduled job.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Cron accepts one-shot jobs in the past and leaves them scheduled with no next_run_at