Script-Only Cron Jobs
Script-Only Cron Jobs — easy-to-understand guide based on official docs
Think of a kitchen timer that not only rings but also chops the vegetables for you—that’s the idea behind Hermes’ script-only cron jobs: set a schedule, and the system runs your command automatically, no thinking required.
What Is “Script-Only Mode”?
In plain terms, script-only mode tells Hermes to execute a script (like a Shell command) at a specified time and return the raw output directly to you. There’s zero AI involvement—no token consumption, no “thinking” delay. It’s like using your system’s built-in cron, but with a simpler setup and a friendlier interface.
How to Create a Script-Only Task
You can create one from the chat window with /cron, or via the CLI. The key is adding the --no-agent flag:
# In chat
/cron add "every 1h" "echo 'hello' && date" --no-agent
# Using CLI
hermes cron create "every 2h" "df -h" --no-agent
That’s it. "every 1h" is the time expression (standard cron formats like 0 * * * * also work), the string in quotes is the script to run, and --no-agent tells Hermes to skip AI processing and just execute.
What Can the Script Do?
- Any Shell command:
ls -la,python backup.py,curl api.example.com—all fair game - Raw output returned: Whatever the script prints, you receive verbatim—no AI rewriting
- Recurring or one-shot:
"every 5m"loops forever, or"30m"runs once after 30 minutes
Where Do Results Go?
By default, results are sent back to the chat window where you created the task. You can also save them to a local file:
hermes cron create "daily 9am" "./report.sh" --no-agent --output /path/to/report.txt
Managing Your Tasks
All tasks can be managed with simple commands:
hermes cron list # View all tasks
hermes cron pause <id> # Pause
hermes cron resume <id> # Resume
hermes cron remove <id> # Delete
In chat, you can also just say “pause that hourly task” and Hermes will handle it.
Things to Keep in Mind
- No nesting: Cron tasks cannot create other cron tasks—this prevents infinite loops
- Model-independent: Script-only mode doesn’t involve any AI model, so switching models won’t affect your scheduled jobs
Summary
Script-only cron jobs give Hermes a “mechanical arm”—it doesn’t think, but it’s dependable. Practical tip: Start with a simple echo command to verify you receive output, then swap in your real script. For example, try "every 1h" "echo ok" --no-agent first. Once that works, replace it with your production script—this makes troubleshooting much easier.
📖 Official Docs
This article is based on the official Hermes Agent documentation:Official docs › guides/automate-with-cron