Will my Hermes scheduled job run twice after a restart?
Hermes Agent is designed to skip a scheduled occurrence that its retained execution history already records as completed. An interrupted attempt can instead become unknown and is not automatically rerun; a recurring job’s next scheduled occurrence can still run. Neither Hermes nor managed hosting on Vavio guarantees that an external action, such as sending a message or creating an invoice, happens exactly once.
The useful question after a restart, update or restore is: what does the run history prove, and what actually happened at the destination? A finished run record and a sent invoice are different evidence. Check both before asking Hermes to try again.
This guide reviews Hermes v0.23.1 documentation and source. We did not restart a Vavio computer or run a recovery experiment for this article.
What each run state tells you
Hermes writes an attempt to the profile’s ~/.hermes/cron/executions.db before dispatching it. The attempt moves through claimed and running to a terminal state. Where you have the Hermes command line, inspect it with:
hermes cron runs <job-id> --limit 20
You can also ask Hermes to show the job’s recent execution history. Replace <job-id> with the actual ID from your job list.
| History state | What it establishes | What to do after a restart |
|---|---|---|
claimed or running |
Hermes recorded an attempt that has no terminal result yet. | Check whether its worker is still active; a restarted gateway can have a surviving worker. |
completed |
The attempt has a recorded completion. For a scheduled attempt with an exact occurrence identity, retained history can prevent replay of that occurrence. | Check the saved result and destination before requesting extra work. |
failed |
The attempt finished as a failure. | Read its error and check whether any external action happened before the failure. Failure does not undo a message or write. |
unknown |
Hermes cannot establish completion of an abandoned attempt. | Inspect the destination before deciding whether to run it manually. Unknown is not proof that nothing happened. |
A worker is not marked abandoned simply because the gateway restarted. Recovery checks the original process identity; a living but silent worker can be released after a derived stale bound. The run monitor refreshes progress while tools or streaming are active, so a long job is not treated as stale merely because it has been running for hours. Upstream execution-history rules.
Does restoring an older schedule replay finished work?
A completed scheduled attempt records its exact scheduled instant separately from the time it was claimed. If an older jobs.json restores that same occurrence while the retained execution ledger still records its completion, Hermes skips it and moves a recurring job forward. This also covers a run that originally started late.
That protection depends on the evidence surviving. An old backup of the execution ledger can erase the later completion record. Pruned history, legacy attempts without an occurrence identity and an unavailable ledger also cannot establish that the occurrence completed. Do not treat restoring a backup as a way to undo something Hermes already sent or changed elsewhere.
A manual run is extra work. It does not consume the identity of the next scheduled occurrence. Running a morning digest manually and then leaving its normal schedule enabled can produce two digests even when replay prevention works correctly.
Why a job can run once when the gateway returns
A late result after restart may be a catch-up run rather than a duplicate. By default, a missed recurring local job runs once when scheduling returns. A long outage collapses missed slots into one run instead of replaying every missed slot; paused jobs do not catch up.
For a job where stale output is useless, upstream supports a per-job opt-out:
hermes cron edit <job-id> --catch-up off
The opt-out skips recurring misses only beyond the job’s grace window; a late run inside grace still runs. By default, grace is half the period, clamped to 120 seconds–2 hours.
A per-job --catch-up on requests one late run. Without an override, recurring jobs follow the global cron.catch_up_missed default, subject to an explicit job grace limit. A one-shot normally has a 120-second grace window and is dropped if missed beyond it; explicit catch-up can make it run once, late. Check your job’s setting rather than assuming every job follows the default.
The history records skipped misses or misses collapsed into a catch-up. Read those rows alongside the ordinary attempts. The schedule and timezone guide explains how to distinguish late execution from the wrong clock. These are the local scheduler’s rules; an external scheduler has a separate misfire sweep and should be checked against its own configuration.
Can an in-flight job survive a gateway restart?
It can, under the documented restart-safe systemd worker setup. A gateway running as a systemd service launches due work in a separate user scope, so restarting the gateway need not kill that worker.
That requires a working user systemd session. Without it, the default can degrade to a separate process without the protective scope; a gateway restart can then kill the job. Upstream’s cron.require_restart_safe_scope: true instead refuses to run without that protection. This setting does not make a whole computer reboot harmless or turn external writes into transactions.
Those are upstream conditions, not a claim that we qualified every update or restart on Vavio. The update guide explains what to check after an update; the terminal and gateway guide explains which process needs to stay running.
Before retrying a job that sends or writes something
Consider an invoice job that sent its invoice, then lost its worker before recording completion. Its history can say unknown even though the invoice exists. Retrying the entire job without checking can create another invoice. This is an illustrative failure scenario, not an observed Vavio incident.
- Read the attempt and saved output. Identify the job, scheduled time, status and any error.
- Check the destination. Look for the actual message, file, invoice or other change at that time. Delivery status alone does not prove every action the job took.
- Decide what remains. If the result exists, avoid repeating it. If part of the job is missing, ask for that specific repair. If the outcome is uncertain and duplicates matter, investigate before starting a manual run.
- Make future writes safe to repeat. Where the destination supports it, use a stable identifier or idempotency key for each intended operation. Include a check for an existing result in the job. A prompt alone cannot guarantee that the destination rejects duplicates.
A useful request to Hermes is:
Show the recent execution history and saved output for “Invoice run”. Do not run it again. Tell me the scheduled time and status, then help me check whether the invoice already exists at the destination.
Vavio supplies a managed remote Hermes computer for $14.99 per month, with model usage billed separately. It keeps the runtime off your laptop; you still need to verify uncertain external actions before repeating them. See the current hosting offer, or apply the same history checks to a Hermes server you maintain yourself. If the run finished but its report never arrived, use the missing-result checks.
Sources
- Hermes v0.23.1 execution history and replay limits, checked 16 November 2026
- Local missed-run policy and per-job catch-up, checked 16 November 2026
- Restart-safe workers and degraded execution, checked 16 November 2026
- How completed scheduled occurrences are recognized, checked 16 November 2026
- Abandoned-attempt recovery, checked 16 November 2026
Written by Vavio with AI assistance and checked against pinned official Hermes v0.23.1 documentation and source. This is a source review, not a restart or recovery trial.