Automate Everything with Cron Scheduling in Hermes Agent

Why Automate with Hermes?

You've been chatting with Hermes interactively. But what if Hermes could work for you while you sleep? With the built-in cron system, Hermes executes tasks on a schedule β€” no human input required.

Common automations:

  • πŸ“Š Daily reports β€” Summarize logs, metrics, or news every morning
  • πŸ” Monitoring β€” Check server health and alert on issues
  • πŸ“§ Digests β€” Compile and send email newsletters
  • πŸ”„ Sync tasks β€” Pull data from APIs and update databases
  • 🧹 Maintenance β€” Clean up logs, rotate backups, update dependencies

Setting Up Your First Cron Task

Enable the Cron System

hermes config set cron.enabled true

Create a Simple Task

hermes cron add "Send me a daily weather summary for Tokyo" \

--schedule "0 8 *" \

--name daily-weather

βœ… Cron task created!

Name: daily-weather

Schedule: 0 8 * (every day at 8:00 AM)

Command: Send me a daily weather summary for Tokyo

Next run: Tomorrow at 08:00

Cron Schedule Syntax

The schedule follows standard cron format:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0-59)

β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€ hour (0-23)

β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€ day of month (1-31)

β”‚ β”‚ β”‚ β”Œβ”€β”€β”€ month (1-12)

β”‚ β”‚ β”‚ β”‚ β”Œβ”€ day of week (0-6, Sun=0)

β”‚ β”‚ β”‚ β”‚ β”‚

*

| Expression | Meaning |

|-----------|---------|

| 0 9 * | Every day at 9:00 AM |

| /30 * | Every 30 minutes |

| 0 9 1-5 | Weekdays at 9:00 AM |

| 0 0 1 | First day of every month at midnight |

| 0 /6 | Every 6 hours |

| 0 9,18 * | At 9 AM and 6 PM daily |

Human-Readable Shortcuts

Hermes also accepts readable schedules:

hermes cron add "Check for security updates" --schedule "every 6 hours" --name security-check

hermes cron add "Backup database" --schedule "daily at 3am" --name db-backup

hermes cron add "Generate weekly report" --schedule "every monday at 9am" --name weekly-report

Managing Cron Tasks

List All Tasks

hermes cron list

Scheduled Tasks:

ID Name Schedule Status Last Run Next Run

1 daily-weather 0 8 * βœ… Active Today 08:00 Tomorrow 08:00

2 security-check 0 /6 βœ… Active Today 12:00 Today 18:00

3 db-backup 0 3 * ⏸️ Paused Yesterday 03:00 β€”

4 weekly-report 0 9 1 βœ… Active Monday 09:00 Next Monday 09:00

Pause and Resume

hermes cron pause db-backup

hermes cron resume db-backup

Edit a Task

hermes cron edit daily-weather --schedule "0 7   *"

hermes cron edit daily-weather --command "Send weather summary for Tokyo and New York"

Delete a Task

hermes cron delete daily-weather

Run a Task Immediately

hermes cron run daily-weather

Real-World Automation Recipes

Recipe 1: Daily Development Digest

hermes cron add \

"Check my GitHub notifications, summarize new issues and PRs, \

and list any failed CI builds. Format as a brief morning digest." \

--schedule "0 8 1-5" \

--name dev-digest \

--notify telegram

Recipe 2: Server Health Check

hermes cron add \

"Check the status of these servers: \

- web: https://myapp.com/health \

- api: https://api.myapp.com/ping \

- db: run 'pg_isready' locally \

If any are down, alert me immediately." \

--schedule "/15 *" \

--name health-check \

--notify telegram \

--alert-only

The --alert-only flag means Hermes only sends a notification if something is wrong β€” no noise when everything is healthy.

Recipe 3: Dependency Update Monitor

hermes cron add \

"Run 'npm outdated' in ~/projects/my-app and tell me which \

packages have major version updates. Ignore patch versions." \

--schedule "0 10 1" \

--name dep-monitor

Recipe 4: Log Rotation & Analysis

hermes cron add \

"Analyze /var/log/nginx/access.log for the past 24 hours: \

- Top 10 most visited pages \

- Any 5xx errors and their causes \

- Unusual traffic patterns \

Then rotate the log file." \

--schedule "0 2 *" \

--name log-analysis

Recipe 5: Content Publisher

hermes cron add \

"Check ~/blog/drafts/ for any .md files with 'publish: true' \

in the frontmatter. For each one, build the page, deploy to \

production, and move the file to ~/blog/published/." \

--schedule "0 6 *" \

--name auto-publish

Notification Channels

Cron tasks can send results to any connected platform:

# Notify via Telegram

hermes cron add "..." --notify telegram

# Notify via Discord

hermes cron add "..." --notify discord --notify-channel 1234567890

# Notify via Slack

hermes cron add "..." --notify slack --notify-channel "#ops"

# Notify via email

hermes cron add "..." --notify email --notify-to "you@example.com"

# Multiple channels

hermes cron add "..." --notify telegram --notify slack

Cron Task Configuration

Full YAML Configuration

# ~/.hermes/cron/tasks.yaml

tasks:

- name: daily-weather

schedule: "0 8 *"

command: "Send me a daily weather summary for Tokyo"

model: "openai/gpt-4o-mini" # Use a cheap model for simple tasks

session: "cron-weather" # Dedicated session

timeout: 60 # Max execution time (seconds)

retries: 2 # Retry on failure

notify:

telegram: [123456789]

enabled: true

- name: health-check

schedule: "/15 *"

command: "Check server health..."

model: "openai/gpt-4o-mini"

timeout: 30

alert_only: true # Only notify on failures

notify:

telegram: [123456789]

slack: ["#ops"]

enabled: true

Viewing Logs

# View logs for a specific task

hermes cron logs daily-weather

# View logs for the last N runs

hermes cron logs daily-weather --last 5

# View all cron logs

hermes cron logs --all

# Follow logs in real-time

hermes cron logs --follow

Troubleshooting

Task not running

# Check if cron is enabled

hermes config get cron.enabled

# Verify the schedule

hermes cron info daily-weather

# Check for errors in the last run

hermes cron logs daily-weather --last 1

Task taking too long

Set a reasonable timeout:

hermes cron edit slow-task --timeout 120

Cost management

Use cheap models for automated tasks:

hermes cron edit daily-weather --model openai/gpt-4o-mini

Next Steps


Last updated: April 17, 2026 Β· Hermes Agent v0.8