Hermes Agent

How-To Guide

How to Schedule Hermes Agent Cron Jobs That Actually Deliver

Create and verify Hermes Agent cron jobs with fresh-session prompts, workdir, script-only mode, provider safeguards, exact delivery, and recovery commands.

Quick answer

Create an exact schedule, write a self-contained fresh-session prompt, set an absolute workdir for project jobs, restrict skills/toolsets, confirm the provider snapshot, and pin delivery. Trigger one manual run and verify the real result. Use script-only no-agent mode for deterministic zero-token watchdogs.

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.

Deploy Hermes faster with FlyHermes

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. 1

    Prove the task and gateway work

    Run the task once interactively, then check hermes doctor, hermes gateway status, and hermes cron status. Fix provider, tool, credential, or gateway failures before adding a schedule.

  2. 2

    Choose agent, hybrid, or script-only mode

    Use an agent job for research, judgment, writing, browser work, or publishing. Use --no-agent --script filename for 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. 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. 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. 5

    Set an absolute project workdir

    Add --workdir /absolute/path/to/project for 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. 6

    Attach only needed skills and toolsets

    Add repeatable --skill flags for reusable procedures. Configure the cron platform in hermes tools, or ask Hermes to set per-job enabled_toolsets, so routine jobs do not carry unnecessary browser, terminal, or delegation access.

  7. 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. 8

    Pin exact delivery

    Use --deliver local, telegram, discord, or an exact target such as telegram:-1001234567890:17585. Use comma-separated targets for deliberate fan-out. Do not ask the cron prompt to send the same final answer itself.

  9. 9

    Trigger one run and inspect the outcome

    Run hermes cron run "Weekday brief", wait for the next scheduler tick, then inspect hermes cron list, hermes cron status, local output, and the exact destination. The schedule row is not the success proof.

  10. 10

    Add silence, continuation, or chaining deliberately

    Use [SILENT] for successful agent no-op runs, empty stdout for script-only silence, attach_to_session for a replyable brief, and context_from for explicit upstream-output handoffs. These are opt-in behaviors, not shared memory.

  11. 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, then hermes cron resume <id-or-name>. Use remove only when the job should be deleted.

Pro Tips

  • 💡Use cron expressions for exact wall-clock schedules and intervals such as every 2h for 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.

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 stop a failing cron job?

From a normal shell, run hermes cron pause <id-or-name>. Fix the cause, test with hermes cron run <id-or-name>, and resume only after the output and delivery path pass.

Related setup and cost guides

Related Guides