Routines
A routine asks a bot the same thing on a schedule, such as checking CI every weekday morning. This page covers adding one, the schedules it takes, and what happens when it runs.
Add a routine
Open the bot and show Activity beside its conversation. Under Routines, choose New routine.
- Name
What the routine is called in the list, such as Morning check.
- Prompt
What the bot is asked each time.
- Repeats
How often it runs.
Then choose Add routine. It shows under Routines with its schedule.
You can also ask the bot. Tell it "check the release branch every weekday at nine" and it makes the routine itself. A bot you draft in the creator starts with a first routine, which you can change there.
Pick a schedule
Repeats takes one of these.
| Repeats | What you set |
|---|---|
| Every hour | Nothing more. |
| Every day | The time, under At. |
| Weekdays | The time, Monday to Friday. |
| Every week | The day, under On, and the time. |
| Every… | A number of minutes or hours. |
| Once | A date and time. It runs then and not again. |
| Cron expression | Five fields: minute, hour, day of the month, month, and day of the week, such as 0 9 * * 1-5. |
A repeating schedule follows the clock and time zone of the machine the bot lives on. Once runs at the moment you entered.
What a run does
When a routine is due, its prompt is posted in the bot's conversation and the bot takes a turn, as if you had written it. The bot reads what it remembers, starts threads if there's work to do, and updates what it shows under Needs you. You find the run in the conversation, marked as a routine, and its threads under Activity.
A routine runs on the machine the bot lives on. A run missed while that computer sleeps happens once it's back. To keep routines on time, move the bot to a machine that stays on: see Move a bot to another machine.
A routine does not run when:
- the bot has spent its budget for the day. Its routines run again from midnight. See Limits and budgets.
- the bot is being moved to another machine.
- the bot was removed. Removing a bot stops its routines.
Run, edit or remove one
Click a routine under Routines, or right-click it.
- Run now
Asks the bot its prompt at once, without changing the schedule.
- Edit…
Changes its name, prompt or schedule.
- Remove routine
Deletes it.
To pause a routine without removing it, switch it off in Settings › Triggers. A routine that is switched off shows Off in place of its schedule, and can't be run.
Other triggers
A bot's routines run on a schedule only. Solanum's webhooks start ordinary threads, not a bot's turn. Settings › Triggers lists the routines of the bots on this computer beside your other triggers, each named by its bot, with a switch for each.
