How-To Guide
How to Schedule and Recover Hermes Agent Cron Jobs
Create, verify, diagnose, and recover Hermes cron jobs with exact schedules, lifecycle states, run history, delivery proof, timeouts, and safe reruns.
Quick answer
Create a supported recurring schedule, use a self-contained prompt and absolute workdir, pin the real delivery target, and trigger one test. If it fails, separate job lifecycle (scheduled, paused, completed, blocked_config) from execution history (completed, failed, unknown) and delivery state. Pause consequential jobs before repair, reconcile external side effects before rerunning, and remember cron expressions use the host's local timezone.
Hermes can schedule one-shot work, recurring agent sessions, hybrid script-plus-agent checks, and zero-token script-only watchdogs. Reliable setup is not only a cron expression: the future run needs a complete prompt, the right project and tools, controlled provider behavior, exact delivery, and a result you can verify.
Managed cloud · API costs included · Skill library · Cancel anytime
Before you start:
- ☑Hermes Agent installed and able to complete the underlying task interactively
- ☑A running gateway for automatic scheduler ticks and platform delivery
- ☑A tested provider/model lane for LLM-driven jobs, or a tested script under ~/.hermes/scripts/ for no-agent mode
- ☑An absolute project directory when the job needs repository instructions or file/terminal tools
- ☑A tested local, Telegram, Discord, Slack, email, or other delivery destination
Steps
- 1
Prove the task and gateway work
Run the task once interactively, then check
hermes doctor,hermes gateway status, andhermes cron status. Fix provider, tool, credential, or gateway failures before adding a schedule. - 2
Choose agent, hybrid, or script-only mode
Use an agent job for research, judgment, writing, browser work, or publishing. Use
--no-agent --script filenamefor a deterministic script under~/.hermes/scripts/. Use a pre-check script without no-agent when the script should wake the LLM only after a change. - 3
Write a self-contained future prompt
Cron agent runs start in fresh sessions. Include source paths, URLs, constraints, output format, failure behavior, and the proof of success. Do not rely on phrases such as 'the usual report.'
- 4
Create a supported schedule
Use
hermes cron create "0 9 * * 1-5" "<prompt>" --name "Weekday brief"for a weekday 9am job. Hermes also supports relative delays (30m), intervals (every 2h), and ISO timestamps. - 5
Set an absolute project workdir
Add
--workdir /absolute/path/to/projectfor repository work. Hermes then loads supported project instruction files and points terminal, file, and code tools at that directory. Relative or missing directories are rejected. - 6
Attach only needed skills and toolsets
Add repeatable
--skillflags for reusable procedures. Configure the cron platform inhermes tools, or ask Hermes to set per-jobenabled_toolsets, so routine jobs do not carry unnecessary browser, terminal, or delegation access. - 7
Confirm provider and model behavior
Hermes snapshots the active provider/model when the job is created and fails closed after an unexpected global default change. The standalone create command does not expose provider/model flags, so ask Hermes in chat to pin those advanced job fields when needed.
- 8
Pin exact delivery
Use
--deliver local,telegram,discord, or an exact target such astelegram:-1001234567890:17585. For Slack, useslack:C0123456789for a channel ID,slack:#engineeringfor a discovered channel name, orslack:U0123456789for a DM. Invite the bot and prefer raw IDs for unattended work. - 9
Trigger one run and inspect the outcome
Run
hermes cron run "Weekday brief", wait for the next scheduler tick, then inspecthermes cron list,hermes cron runs "Weekday brief" --limit 20, local output, and the exact destination. A completed ledger row is useful evidence, but the delivered message or artifact is the final proof. - 10
Add silence, continuation, or chaining deliberately
Use
[SILENT]for successful agent no-op runs, empty stdout for script-only silence,attach_to_sessionfor a replyable brief, andcontext_fromfor explicit upstream-output handoffs. These are opt-in behaviors, not shared memory. - 11
Know the recovery commands
If provider limits or bad delivery create repeated failures, use a normal shell:
hermes cron pause <id-or-name>, fix the provider/gateway/target, trigger a test, thenhermes cron resume <id-or-name>. Use remove only when the job should be deleted. - 12
Classify the failure layer
Run
hermes gateway status,hermes cron status,hermes cron list, andhermes cron runs <job> --limit 20. Separate schedule lifecycle, execution result, delivery error, and intentionally silent output before changing the job. - 13
Check timezone and repeat state
Cron expressions use the scheduler host's local timezone. Relative delays and ISO timestamps are one-shot; intervals and five-field expressions recur. A completed job may simply have exhausted its finite repeat count.
- 14
Recover with a controlled rerun
Pause a noisy or consequential recurring job, fix one failing layer, trigger one test, and verify the external destination or artifact before resuming. Reconcile any unknown run first so a rerun cannot duplicate side effects.
- 15
Pin reasoning effort when useful
Use
hermes cron edit <job> --reasoning-effort high|minimalto give complex and routine jobs different thinking budgets. The pin is user-owned and does not apply to no-agent jobs.
Pro Tips
- 💡Use cron expressions for exact wall-clock schedules and intervals such as
every 2hfor cadence-based work. - 💡Agent jobs run in fresh sessions; keep procedures in skills and make every prompt self-contained.
- 💡CLI-created jobs default to local delivery, while messaging-created jobs normally default to origin.
- 💡Script-only jobs save model tokens: non-empty stdout delivers, empty stdout stays silent, and failures alert.
- 💡Use a hybrid pre-check script with
{"wakeAgent": false}when frequent polls rarely need reasoning. - 💡Set a workdir for repo jobs; otherwise project instructions and the intended cwd are not automatic.
- 💡Pin important reports to an exact chat, topic, thread, or channel and verify the first delivery.
- 💡Pause noisy jobs from a normal shell if the interactive provider is rate-limited.
- 💡The dashboard is a checkpoint; the delivered message or artifact is the success proof.
- 💡Use continuable delivery only for briefs that need follow-up, and context_from only for explicit job pipelines.
Troubleshooting
❌ The job did not run
✅ Check hermes cron status and gateway health, then confirm the schedule, next_run_at, host uptime, and repeat state. Trigger one manual run with hermes cron run <id-or-name>.
❌ The job stopped after a global model change
✅ Hermes fails closed to prevent an unattended provider/model switch. Ask Hermes to pin the intended provider/model on the job, then trigger a test run.
❌ The job runs in the wrong repository
✅ Set an absolute workdir. Cron jobs are detached from repositories by default and do not otherwise load project instruction files automatically.
❌ The job succeeds but the channel receives nothing
✅ Verify the exact delivery target, home-channel configuration, platform permissions, and gateway adapter. Inspect local cron output to separate execution from delivery.
❌ A rate-limited job keeps sending errors
✅ Use a normal shell to run hermes cron pause <id-or-name>. Fix or change the provider lane, reduce frequency/toolsets, or move deterministic checks to no-agent mode before resuming.
❌ Replying to a delivered brief loses context
✅ Continuable delivery is off by default. Enable attach_to_session for that job or cron.mirror_delivery globally, then test on a supported thread or DM surface.
❌ The job shows completed and will not fire again
✅ Check whether the schedule was a one-shot or its repeat count was exhausted. Edit/re-arm a repeatable job or create a new future one-shot deliberately.
❌ Run history says unknown after a restart
✅ Treat the attempt as uncertain. Reconcile the real target first; Hermes preserves unknown as an audit state and does not automatically rerun it.
❌ The job fires at the wrong hour
✅ Cron expressions use the scheduler host's local timezone. Compare the host clock with next_run_at and include the report's operating timezone in the prompt.
❌ The task completed but delivery timed out
✅ Inspect last_delivery_error and the real destination. Media and Bot Chat delivery have separate timeout budgets; the target turn may still finish, so do not immediately duplicate the run.
FAQ
How do I create a daily Hermes cron job?
Use hermes cron create "0 9 * * *" "<self-contained prompt>" --name "Daily job" --deliver <target>, then trigger one test with hermes cron run "Daily job".
Do Hermes cron jobs run while my laptop sleeps?
No. The gateway host must be awake and running. Use an always-on server or a managed service when the schedule is business-critical.
Can I schedule a job with no model cost?
Yes. Use --no-agent --script filename for a script under ~/.hermes/scripts/. Empty stdout is silent, non-empty stdout is delivered, and errors alert.
Why should I set workdir?
Without workdir, cron is detached from the repository. An absolute workdir loads supported project instructions and makes file, terminal, and code tools start in the intended project.
How do I send a Hermes cron job to a specific Slack channel?
Invite the bot to the channel and use --deliver slack:C0123456789 with the raw channel ID. Trigger one run, inspect hermes cron runs <job> --limit 20, and confirm the message landed in that channel.
What is the difference between failed and blocked_config?
Failed describes an execution attempt that did not complete. blocked_config is a preflight state: Hermes found a provider, skill, or delivery configuration problem before inference and avoided the model call.
Does Hermes automatically rerun an unknown cron attempt?
No. Unknown is retained for audit after restart recovery. Reconcile the external target and trigger a new attempt only when duplication is safe.
How long can a Hermes cron job run?
Agent runs use an inactivity timeout, while pre-run scripts, media sends, cleanup, and Bot Chat delivery have separate configurable budgets. Diagnose the stalled phase before increasing a timeout.
Related setup and cost guides
AI agent cron reliability guide
Understand execution modes, provider safeguards, continuable delivery, chaining, and proof-based production checks.
Provider costs and rate limits
Fix 402/429 failures, exhausted OAuth limits, fallback behavior, and scheduled-job budgeting.
Gateway troubleshooting
Recover when a job completes but Slack, Telegram, Discord, or another platform never receives the result.
Hermes Agent Slack integration
Configure Slack tokens, scopes, channel invitations, home-channel delivery, and exact cron targets.
Hermes Dashboard and Web UI
Inspect cron, provider, profile, tool, and gateway state without mistaking dashboard status for delivery proof.