~/.hiroshi/config.toml and run automatically when the daemon is active — no separate scheduler binary or system cron entry required.
Configuring Cron Tasks
Add one or more[[cron.tasks]] entries to your config.toml. Each entry defines a task name, when it runs, which agent executes it, and the prompt that agent receives.
Task Fields
A unique identifier for the task. This name appears in
~/.hiroshi/hiroshi.log so you can trace which task fired and when.A standard 5-field cron expression in the format
min hour day-of-month month day-of-week. The scheduler checks every minute and fires any task whose expression matches the current time.The name of the agent that executes this task, as defined in
~/.hiroshi/AGENTS.md. For example, "Architect" or "Developer".The message sent to the agent when the task fires. Write this exactly as you would type it in the terminal — the agent has access to the sandbox workspace and any enabled skills.
Cron Schedule Quick Reference
Use the table below to build common schedule expressions. The five fields are orderedminute hour day-of-month month day-of-week.
| Schedule | Meaning |
|---|---|
0 0 * * * | Daily at midnight |
0 9 * * 1-5 | Weekdays at 9 AM |
0 */6 * * * | Every 6 hours |
30 8 * * 1 | Mondays at 8:30 AM |
* * * * * | Every minute |
0 */2 * * * | Every 2 hours |
Weekly Database Maintenance
Regardless of the tasks you define, Hiroshi automatically runs a timestamped database backup followed by a SQLiteVACUUM every Sunday at 3:00 AM. The backup is written to ~/.hiroshi/backups/hiroshi_backup_YYYY-MM-DD_HH-MM-SS.db. You do not need to configure this — it runs as part of the cron scheduler loop.
How the Scheduler Executes Tasks
When a cron task fires, Hiroshi does the following before calling the agent:Export daily log
The current session’s conversation history is written to a dated Markdown file in
~/.hiroshi/memory/.Compact memory
The memory engine summarizes recent conversation history and appends a new entry to
~/.hiroshi/memory/MEMORY.md.Notes
- Cron tasks only run when the daemon is active. Start the daemon with
hiroshi daemonbefore relying on scheduled tasks. - The scheduler wakes every minute, aligns to the next whole minute boundary, and evaluates each task’s schedule expression against the current time.
- Overlapping tasks run in separate async threads — one slow task will not block another from firing.
Cron task output, task trigger events, and any errors are written to
~/.hiroshi/hiroshi.log. Run tail -f ~/.hiroshi/hiroshi.log to watch task execution in real time.