> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Routines

> Turn a job you would otherwise ask for by hand into recurring or triggered automation your agent builds and runs for you.

A routine is a job your agent sets up once and then runs again on its own, on a schedule or whenever something happens. You do not need to open the chat and ask each time.

## When to use a routine instead of a one-off job

Ask for a one-off job when you want an answer right now and will not need it again. Ask for a routine when you want the same job to repeat, or to fire automatically when something happens.

> Check this product's price every morning at 9am and tell me if it drops below \$40.

> Every Monday morning, collect the new sign-ups from this app and send me the list.

If you are not sure yet whether something should recur, say so. Your agent can build it as a one-off first and turn it into a routine later.

## How your agent builds a routine

Building a reliable routine takes more than writing a prompt. Your agent walks through four phases in the same chat, and tells you which phase it is in.

**1. Learning**

Your agent explores the app or page involved, so it understands the actual screens and data before writing anything.

**2. Building**

It writes the automation itself. This step does not touch your phone. It is checked for correctness before anything runs live.

**3. Testing**

Your agent runs the automation for real, once, on a device, and shows you the outcome. This is the first live run and it must succeed before your agent moves on.

**4. Deploy**

Each deploy needs a fresh approval card from you. The trigger goes live with one more real run to confirm nothing changed. The routine is activated only if that verification run passes; otherwise your agent rolls the deploy back. From here the routine fires on its own.

Along the way your agent asks you a small set of questions up front, like cadence, which device, and how results should be checked, so it does not have to interrupt you again later.

## Triggers

A routine needs exactly one trigger, chosen when you set it up.

| Trigger | Fires when |
| - | - |
| **Schedule** | A recurring time you set, for example daily at 9am. You can give it an end date ("run this every Monday until October 15") instead of asking for it to run forever. |
| **App event** | Something happens in a connected app, such as a new email. |
| **Device event** | Something happens on a device. |
| **Platform event** | Something happens on the platform, such as a task finishing. |
| **Manual** | You or your agent fire it on demand, with no recurring schedule. |

For a time-of-day schedule without a timezone, your agent asks which timezone to use. Interval schedules (every N minutes or hours) use UTC. Manual triggers do not need a timezone.

## What a run produces

You choose how each routine delivers its result: a result card (the default), a summary written by your agent (which costs an agent turn), or nothing. A routine posts at most one result card per hour.

A run can also produce a downloadable file, depending on what you asked for.

For result checking, you choose how thorough your agent should be: it can trust the automation's own checks, review the result itself, or do both, flagging only what looks off. Ask for one of these when you set the routine up, or leave it to your agent's judgment for a simple job.

A routine can also send its result straight to a webhook endpoint you own, as one of its steps. That is different from the **Notify on success** and **Notify on failure** controls in the routine's Notifications dialog, where you pick a webhook to receive a notification for each outcome. Turning a routine's notifications off asks for your approval; set up the webhook itself in the dashboard. See [Notifications](https://docs.mobilerun.ai/agents/notifications.md) and [Webhooks](https://docs.mobilerun.ai/webhooks.md) for both mechanisms.

## Running the same job across many phones

Ask your agent to run a routine, or a one-off job, across several devices at once.

> Run this same check on all five of my Cloud Android phones.

Your agent confirms it actually has that many devices ready before starting, runs up to eight of them in parallel, and retries any device that failed once before reporting back. You get a result per device, not just "mostly done."

## When a run fails or repairs itself

Every routine watches its own health by default. If a run fails for a fixable reason, your agent can automatically diagnose and repair it, then try again. On an existing routine you can ask your agent to turn repair down or off, but not to raise or re-enable it; for that, build a new routine. Turning health monitoring off asks for your approval.

A failure that is not fixable this way, such as a login your agent cannot get past, is not silently retried forever. Your agent reports it and asks what you want to do next.

## Inspecting past runs

Every run is recorded. Ask your agent to show you the history of a routine, what happened in a specific run, or why the last one failed, and it reads that back to you.

## Pausing, archiving, or deleting a routine

Your agent can pause a routine (it stops firing until you enable it again) and archive one, which frees its slot. Archiving shows an approval card, and enabling a paused routine again shows one too. Your agent cannot delete a routine; delete it from the dashboard.

## Cost

Building a routine (the Learning phase) uses credits the same way a normal job does. Testing and deployed runs use device minutes, plus credits for steps that run the AI agent and for repairs. See [Limits and costs](https://docs.mobilerun.ai/agents/limits-and-costs.md) and [Credits & usage](https://docs.mobilerun.ai/credits.md) for how usage is measured.

## Related

> [card] [Notifications](https://docs.mobilerun.ai/agents/notifications.md)
>
> Get notified when a run finishes, fails, or needs you.

> [card] [Webhooks](https://docs.mobilerun.ai/webhooks.md)
>
> Configure the endpoints a routine can send results to.

> [card] [Results](https://docs.mobilerun.ai/agents/results.md)
>
> How files and structured results are presented back to you.

> [card] [Limits and costs](https://docs.mobilerun.ai/agents/limits-and-costs.md)
>
> Credits, step budgets, and what your agent will refuse.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.