~/.ollim-bot/routines/. The scheduler picks
them up automatically and fires them on their cron schedule.
Overview
A routine tells ollim-bot to run a prompt on a recurring schedule. Routines can run in the foreground (sending a DM) or in the background (running silently in a fork, only notifying you when the agent decides to). The agent also has direct file access to create and edit routines itself. The scheduler polls the routines directory every 10 seconds, so changes take effect almost immediately — no restart required.File format
Each routine is a.md file in ~/.ollim-bot/routines/. The message
field is the markdown body after the closing ---; all other fields go
in the YAML frontmatter. Only non-default fields are written to the
frontmatter.
routines/morning-task-review.md
The
message field does not appear in the frontmatter — it is the
markdown body below the closing ---.Frontmatter fields
| Field | Type | Default | Description |
|---|---|---|---|
id | str | — | Auto-generated 8-char hex ID |
cron | str | — | 5-field cron expression |
description | str | "" | Short summary for routine list |
background | bool | false | Run in a background fork |
model | str | null | Model override (bg only) |
thinking | bool | true | Extended thinking (bg only) |
isolated | bool | false | Fresh context, not forked (bg only) |
update_main_session | str | "on_ping" | Sync mode: always / on_ping / freely / blocked |
allow_ping | bool | true | Allow pings and embeds (bg only) |
allowed_tools | list[str] | null | MCP tool whitelist (bg only) |
disallowed_tools | list[str] | null | MCP tool blacklist (bg only) |
File naming
Filenames are slugified from the message text (lowercase, hyphens, max 50 characters). Theid field in the YAML frontmatter is authoritative
— filenames are for human readability only. Collisions append -2,
-3, etc.
Managing routines
- CLI
- Agent
The Additional flags for background routines:
List all routines:Output:Cancel a routine:
ollim-bot routine subcommand manages routines from the
terminal.Add a routine:| Flag | Description |
|---|---|
--model <model> | Model override |
--no-thinking | Disable extended thinking |
--isolated | Run with fresh context |
--update-main-session <mode> | always, on_ping, freely, or blocked |
--no-ping | Disable ping_user and discord_embed |
Background vs foreground
By default, routines run in the foreground — the agent sends you a DM when the routine fires, running the prompt in the main session context. Setbackground: true to run the routine silently in a background
fork. Text output is discarded — the agent must use ping_user or
discord_embed to reach you.
- Foreground
- Background
The routine fires and the agent sends you a DM with its response,
just like a normal conversation.
routines/evening-wind-down.md
Cron expressions
Routines use standard 5-field cron syntax:minute hour day month weekday. Day-of-week uses 0 for Sunday.
| Expression | Schedule |
|---|---|
0 9 * * 1-5 | 9:00 AM, Monday through Friday |
0 20 * * * | 8:00 PM daily |
30 8 * * 1 | 8:30 AM every Monday |
0 */4 * * * | Every 4 hours |
0 9,13 * * 1-5 | 9:00 AM and 1:00 PM on weekdays |
CronTrigger internally.
Examples
Weekday morning briefing (background)
routines/morning-briefing.md
Weekly review (foreground)
routines/weekly-review.md
Quiet background check (no pings)
routines/quiet-email-check.md
Next steps
Reminders
One-shot and chainable reminders for non-recurring prompts.
Background forks
Deep dive into background fork configuration and behavior.
Ping budget
How notification rate limiting works for background routines.
Real-world examples
See how routines compose into a full daily rhythm with
pipelines, chains, and conditional silence.
