Tutorial Overview
Series index: Hermes Agent Tutorial Series
When You Need This: Read this article if you need automated/recurring tasks, daily reports, nightly backups, or weekly audits running unattended.
This tutorial covers Hermes Agent’s Cron Scheduling — built-in automation for recurring tasks.
What you will learn
- ✅ Cron architecture in Hermes
- ✅ Creating scheduled tasks with natural language
- ✅ Delivery to messaging platforms
- ✅ Task types and examples
- ✅ Managing and monitoring schedules
Cron Architecture
How Hermes cron works
flowchart TD
A[Cron Definition] --> B[Scheduler Daemon]
B --> C{Trigger time?}
C -->|Yes| D[Spawn Hermes task]
C -->|No| E[Wait]
E --> C
D --> F[Execute task]
F --> G[Generate output]
G --> H[Deliver to platform]
style B fill:#e1f5ff
style H fill:#fff3e0
Components
| Component | Purpose |
|---|---|
| Scheduler daemon | Background process monitoring triggers |
| Task spawner | Creates isolated Hermes instance per task |
| Output handler | Formats and delivers results |
| Platform delivery | Sends to Telegram/Discord/etc. |
Creating Scheduled Tasks
Natural language scheduling
Hermes accepts natural language for schedule definitions:
# Daily report at 9am
hermes cron add "every day at 9am" --task "generate daily report"
# Weekly summary on Fridays
hermes cron add "every friday at 5pm" --task "weekly summary"
# Hourly health check
hermes cron add "every hour" --task "check system status"
Standard cron format
Also supports traditional cron syntax:
hermes cron add "0 9 * * *" --task "daily report"
hermes cron add "0 17 * * 5" --task "friday summary"
Task definition
Tasks can be:
- Natural language prompts
- Skill invocations
- Python scripts via RPC
# Natural language task
--task "Summarize today's activities from memory"
# Skill invocation
--task "/daily-report"
# Python script
--task "python:scripts/backup.py"
Delivery to Platforms
Specify delivery target
# Deliver to Telegram
hermes cron add "daily at 9am" --task "report" --deliver telegram
# Deliver to Discord
hermes cron add "weekly friday 5pm" --task "summary" --deliver discord
# Deliver to CLI (stored in file)
hermes cron add "hourly" --task "check" --deliver file:reports/
Delivery configuration
cron:
delivery:
telegram:
enabled: true
chat_id: "-100123456789"
discord:
enabled: true
channel_id: "123456789"
Delivery flow
sequenceDiagram
participant S as Scheduler
participant H as Hermes
participant O as Output
participant P as Platform
S->>H: Trigger task
H->>O: Generate output
O->>P: Format for platform
P->>P: Send message
Note over P: Telegram/Discord/Slack/CLI
style P fill:#fff3e0
Task Types
Daily reports
hermes cron add "daily at 9am" --task "Generate daily progress report:
- List completed tasks from memory
- Summarize key accomplishments
- Identify blockers
- Suggest priorities for today" --deliver telegram
Nightly backups
hermes cron add "daily at 2am" --task "python:scripts/backup_db.py" --deliver file:backups/
Weekly audits
hermes cron add "weekly monday 10am" --task "Audit last week:
- Review all task completions
- Identify patterns and inefficiencies
- Generate improvement recommendations" --deliver slack
Hourly health checks
hermes cron add "hourly" --task "Check:
- API connectivity
- Memory usage
- Model availability
Report any issues" --deliver telegram --alert-only
Custom task examples
| Task Type | Prompt | Schedule |
|---|---|---|
| Code review reminder | “Review pending PRs from GitHub” | Daily 10am |
| Meeting prep | “Summarize documents for today’s meetings” | Daily 8:30am |
| Expense tracking | “Log expenses from last 24 hours” | Daily 6pm |
| Learning session | “Teach me one concept from my notes” | Weekly Sunday |
Schedule Management
View all schedules
hermes cron list
Output:
ID Schedule Task Delivery Next Run
───────────────────────────────────────────────────────────────────────
1 daily 9am daily report telegram 2026-04-14 09:00
2 weekly fri 5pm weekly summary discord 2026-04-19 17:00
3 hourly health check telegram 2026-04-13 17:00
Pause a schedule
hermes cron pause 1
Resume a schedule
hermes cron resume 1
Remove a schedule
hermes cron remove 1
Edit a schedule
hermes cron edit 1 --schedule "daily at 10am" --deliver slack
Monitoring
View execution history
hermes cron history
Output:
Task ID Executed Status Output Size
─────────────────────────────────────────────────────────
1 2026-04-13 09:00 Success 1.2KB
1 2026-04-12 09:00 Success 1.1KB
1 2026-04-11 09:00 Failed API error
3 2026-04-13 17:00 Success 0.5KB
View logs
hermes cron logs 1 --last 10
Alert on failures
cron:
alerts:
on_failure: true
on_timeout: true
delivery: telegram
Advanced Features
Conditional execution
hermes cron add "daily 9am" --task "report" --condition "memory.has_activities"
Only runs if Hermes has activities in memory.
Retry on failure
cron:
retry:
max_attempts: 3
interval: 5m
Timezone support
hermes cron add "daily 9am" --task "report" --timezone "America/New_York"
Troubleshooting
Schedule not executing
Cause: Daemon not running.
Fix:
hermes cron daemon start
hermes cron status
Output not delivered
Cause: Platform not configured.
Fix:
hermes gateway status
hermes config set cron.delivery.telegram.enabled true
Task timing wrong
Cause: Timezone mismatch.
Fix:
hermes config set cron.timezone "UTC"
hermes cron edit 1 --timezone "America/New_York"
Summary
Cron Scheduling provides unattended automation:
- Natural language — Easy schedule definition
- Platform delivery — Results sent to Telegram/Discord/etc.
- Task flexibility — Prompts, skills, or scripts
- Monitoring — History, logs, alerts
- Management — Pause, resume, edit, remove
Key takeaways
- ✅ Natural language makes scheduling easy
- ✅ Results delivered to chosen platform
- ✅ Daily reports, backups, audits are common patterns
- ✅ Monitor via
hermes cron history
Series navigation: