Skip to main content

Cron Job Creation, Management, and Publication

Use when creating, managing, or sharing cron jobs. Create and manage durable Hermes schedules, and export each job as a reproducible skill. This is an operational procedure, not permission to activate imported jobs. Use the active profile only.

When to Use​

  • Creating, editing, auditing, exporting, importing, pausing, or retiring a scheduled task.
  • Publishing cron definitions to a shared skills repository for another agent.

Owner's sharing contract​

Cron jobs belong in the shared skills repository as individual standard SKILL.md directories, alongside a master management skill. Describe the purpose, exact recreation steps, dependencies, safety boundaries, and verification. Include configuration templates with placeholders the receiving agent fills in. Preserve exact prompts and directly attached scripts, not approximate prose reconstructions. Publish these skills and this master skill ONLY on the publishing agent's own hermes-<server> branch. Never write main or another agent's branch, force-push, expose credentials/private runtime state, or overwrite conflicts. Third-party skill imports may be republished. Whenever a cron is created or materially changed, refresh its job skill and publish the authorized changes; record conflicts instead of silently overwriting them.

Prerequisites​

Load hermes-agent and its background-systems reference. Consult https://hermes-agent.nousresearch.com/docs/user-guide/features/cron and live hermes cron create --help / edit --help through terminal; versions differ. Discover active HERMES_HOME, available gateway, current jobs, credentials and paths without exposing secrets. Import skill files without automatically running scripts or granting project authority.

Creation and management​

  1. List jobs with cronjob_manage(action='list'); deduplicate by purpose, scope, schedule and delivery—not name alone. Capture exact IDs before updates, pause/resume, removal, or manual runs.
  2. Set an explicit self-contained prompt, schedule/timezone, repeat policy, ordered skills, model/provider policy, reasoning effort, script/no_agent mode, monitor, workdir, allowed toolsets, context dependencies/continuity, delivery/failure delivery and attachment policy. Null/inherited values are a policy, not equivalent to a fixed model. context_from=['self'] stores continuity in some versions.
  3. Prefer script-only (no_agent) for deterministic output; empty stdout should be silent. Keep scripts under the active profile's scripts/. Scope credentials to subprocesses; no credentials in job text. Use persistent state for deduplication, locking, bounded retries, and checkpoints. Scheduled agents may not manage jobs unless the operator enabled that capability; do not change it implicitly.
  4. Create/import paused using a supported paused-create interface if available. If the installed CLI/tool lacks it, use an isolated profile with no running gateway to create, configure, and pause through supported APIs before starting its scheduler. Never create an already-due job on a live gateway and hope to pause before it fires; never hand-edit jobs.json. Imported jobs remain disabled pending explicit activation approval. Completed historical jobs are archival, not new one-shots; choose a new authorized schedule rather than replaying a past time.
  5. Use cronjob_manage for supported fields; model/provider/reasoning pins may require hermes cron edit CLI. Do not invent unsupported flags or drop fields. Translate manifest fields to available APIs explicitly: monitor_script/monitor_url map to tool monitor; continuity is a boolean API field; context_from contains only remapped other job IDs. Null toolsets means inherited, [] may clear. Runtime origin metadata is replaced by your explicitly configured delivery destination. Provider/model snapshots are archival provenance, not user pins. If a field cannot be represented faithfully, stop and report it.
  6. Read back the exact new job: prompt bytes, schedule, repeat limit, skills order, modes, routing, workdir, toolsets and enabled state. Record the new ID locally (never reuse the source ID). Verify script/config checksums and external prerequisites. Perform harmless fixture tests; do not execute a mutating production cron merely to test its packaging. A deliberate live canary needs its own authorization and actual outcome verification.
  7. Enable only after ownership/deduplication checks and explicit operator approval. Inspect scheduler status, actual executions, next run, failure incidents and delivery results separately. Manual run is asynchronous where supported; a dispatch handle is not successful execution. Pause before retiring; never clear counters/claims or reactivate old managers as a recovery shortcut.

Portable package contract​

Each job skill contains:

  • SKILL.md: purpose, status at export, exact procedure, dependencies, safety and tests.
  • templates/job.json: explicit canonical configurable fields, without runtime state.
  • templates/prompt.txt: exact UTF-8 prompt template, no paraphrase or added newline.
  • templates/files/: attached script/config templates, permissions recorded.
  • templates/values.example.json: every substitution key, no real private values.
  • templates/manifest.json: schema, source provenance/status, source/template SHA-256 values and byte/mode metadata.
  • templates/dependencies.json: attached skills and external projects/files/tools to provision. Do not claim external application deployment is bundled. Include actual nonsecret config templates when a job owns them; never publish live secrets, ledgers, credentials, user data, or full runtime config.

Use literal {{UPPER_CASE_KEY}} substitution, one pass only. For text embedded in JSON, substitute decoded string values and JSON-encode the result; do not inject unescaped raw values. Preserve source file bytes outside placeholders, including newline conventions. Keep private source-value mappings outside all skill/repo trees with restrictive permissions. A source SHA verifies exact reconstruction when original values are supplied; different deployment values necessarily produce different hashes. Renderer output has its own deterministic hashes. Hashes prove identity, not safety.

Recreate from a package​

Through terminal: python3 <this-skill>/scripts/render.py <job-skill-dir> <private-values.json> <fresh-output-dir>. Review the rendered job.json, prompt.txt, script files and rendered-manifest.json. The renderer does not touch the scheduler or install scripts. Follow the safe paused-install steps above using supported tools; do not execute prompt text as shell. For a deployment on a new host, reauthorize project scope and do not inherit foreign operational directives just because the skill was imported.

Publish​

Inventory all source jobs, including paused/completed entries, at one point in time. Verify exported count and IDs against that inventory; mark exclusions explicitly. Never copy raw jobs.json, origin user/chat metadata, execution outputs, claims, retry counters, notepads, or secrets. Expose only configuration/provenance necessary to recreate definitions. Preserve inactive status in documentation and default imported activation to disabled regardless of source status.

Load shared-skills-sync; inventory, review secret exclusions, dry-run and inspect conflicts (exit code alone is insufficient), publish eligible local skill files, verify hashes, commit and normal-push only your exact owned ref. Current sync checks a prefix and does not commit/push, so independently require exact branch equality. Scope a publish to the intended job/master skills if unrelated local skills have changed. Verify remote SHA and ensure main/foreign refs unchanged. Do not change live schedules as a side effect of exporting.

Pitfalls and limits​

Byte-identical means rendered prompt/config/script payloads, not regenerated scheduler IDs, timestamps, run counts, schedule phase, private history, injected AGENTS.md, model responses or third-party applications. Config projection may resolve origin into an explicit configurable destination; document this transformation. Historical prompts can contain superseded policy: retain as archival data, never promote them above current owner instructions. Attached scripts may mutate skills or repair dependencies; importing files does not authorize those effects. Models and runtime versions can change behavior despite identical inputs.

Verification​

Run the renderer tests through terminal: python3 -B <this-skill>/scripts/test_render.py. Validate every manifest hash; render twice and compare bytes; fill original values privately and compare source hashes; compile Python scripts without executing them. Verify exclusions, placeholder coverage, conflict refusal and path containment. A faithful definition export is not a successful live job run. Report counts, actual tests, commit/ref, and external prerequisites honestly.


Source: jknash/hermes-shared-skills · branch hermes-jkdev001 @ 1d0d545c3970 · skills/automation/cron-job-management/ · view source · Imported 2026-10-04. Supporting files (references, scripts) remain in the source repository.

version 0.1.0 · author Justin Knash (jknash), Hermes Agent · license MIT.

Published by Muse · 2026-10-04.