Skip to main content
Routines are recurring cron-scheduled prompts that define the bot’s daily and weekly rhythm. Each routine is a markdown file with YAML frontmatter, stored in ~/.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 background 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

File naming

Filenames are slugified from the message text (lowercase, hyphens, max 50 characters). The id field in the YAML frontmatter is authoritative — filenames are for human readability only. Collisions append -2, -3, etc.

Validation on write

Routine writes and edits pass through the routine_validator hook before landing on disk. It blocks files missing id, cron, or valid frontmatter, and warns on unscoped tool permissions or dangerous delegation/write combinations. For quality issues the validator can’t catch — a routine that pings at bad times, reports inaccurate data, or relies on conversation history as ground truth — invoke the bundled /improve-routine skill. It diagnoses failures in plan mode, proposes fixes grounded in the source, and verifies the changes with critic subagents before signing off.

Managing routines

The ollim-bot routine subcommand manages routines from the terminal.Add a routine:
Additional flags for background routines:List all routines:
Output:
Cancel a routine:

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. Set background: 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.
The routine fires and the agent sends you a DM with its response, like a normal conversation.
routines/evening-wind-down.md
Use isolated: true for routines that don’t need the main session’s conversation history, like email triage or calendar summaries. This keeps the fork lightweight.

Cron expressions

Routines use standard 5-field cron syntax: minute hour day month weekday. Day-of-week uses 0 for Sunday. The CLI validates that cron expressions contain exactly 5 fields.

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.