# Manage routines from the CLI

List, create, run, edit, enable, disable, or delete routines with mao routine.

The `mao routine` commands let an Orchestrator manage scheduled prompts and reminders from a connected terminal. Use `mao routine list` to see existing routines.

## Create or run a routine

1. Run `mao routine list` or `mao routine show "<name>"` to inspect routines.
2. Create one with `mao routine create "<name>" --command "<prompt>"` and a schedule such as `--every 30m`, `--daily 09:00`, `--weekly mon,fri@09:00`, or `--once "2026-06-20 15:00"`.
3. Use `mao routine run "<name>"` to run it now, or `mao routine edit "<name>"` to change it.
4. Use `mao routine enable`, `mao routine disable`, or `mao routine delete` with the routine name to manage it.

> **Limit:** Routine CLI commands require Orchestrator access. Duplicate names need an `--id` selector. A prompt target must be an agent session, not a shell.

Source: https://trymao.dev/docs/routines/routine-cli
