Skip to main content
Every routine has one trigger: a schedule, a condition checked on a schedule, or events of its agent’s repositories on GitHub. You describe it in your own words when you ask the agent, and its proposal card shows it under When.

Schedules

A routine can run: A routine runs at most every 15 minutes. A monthly routine set for a day the month doesn’t have (such as the 31st) runs on the month’s last day. A routine set to run once ends after its run.

Timezone

Times are in the routine’s Timezone, which the page shows next to When. A time that doesn’t exist on a clock change moves forward, and one that happens twice runs at the earlier.

Conditions

A condition is checked on the routine’s schedule, without a model, and starts a run only when it finds something. When it finds nothing, the occurrence is skipped and costs nothing. When it finds the same thing it already reported, it doesn’t report it again for a while. The check sees only what you can see. If you can no longer see what it checks, the occurrence is skipped, and after three in a row the routine pauses itself. On the routine’s page you change only how often a condition looks; to change what it checks, ask the agent.

GitHub events

A routine can start when something happens in its agent’s repositories on GitHub:
  • Pull request opened
  • Pull request ready for review
  • Pull request merged
  • Pull request closed
  • Review submitted
  • Comment on a pull request
  • Checks failed
  • Issue opened
You can narrow it with filters: the base branch a pull request goes into, a label, words in the title, and nothing done by a bot. What the workspace’s own GitHub app does is always ignored. Good to know:
  • The trigger lists the agent’s repositories it watches. If none of them is the agent’s any more (GitHub disconnected, or a repository taken from the agent), the routine pauses itself and waits in Needs you until one is.
  • Events that arrive while a run is working join one next run, which starts when the current one ends.
  • A routine runs at most three times a day on the same pull request or issue; then it stops for that one and tells you once.
  • The run reads only a short summary of each event, as content written outside the workspace, never as instructions.
For events to arrive, the workspace’s GitHub app must send them. Owners and admins see GitHub events in Settings, which shows which events arrive and what the app still lacks, with Turn on GitHub events when the app doesn’t send them yet. See GitHub.

Late and missed runs

If a run could not start on time (for example, the server was not running), the routine’s If missed setting decides:
  • Run once, late: the newest occurrence runs once, late, and the run is told how many didn’t happen. The earlier ones show as Missed. If too much time has passed, they are all missed.
  • Skip: a late occurrence doesn’t run, and shows as Missed.
While a run is still working, the next occurrence is Skipped, since the run before was still working. A run by hand can’t start while another is open. A run that waits for your plan, a monthly limit or the computer keeps trying as the same run, until it is too late; then it shows as Missed. See Routines.