# Run an agent on a schedule

> Have an agent run on its own at a set time, test it, see how its runs went, and pause or resume it.

An agent can run on its own, like a digest every morning or a report on the 1st of every month. Each run starts a task that reports back in your chat, so the result is waiting when you look.

## Add a schedule

1. Open the agent and go to **Runs**.
2. Choose **Run on a schedule**.
3. Under **What to do each time (optional)**, say what this run is for, like "Only this week's invoices." Leave it empty, and the agent does its job as its instruction describes.
4. Choose a day and a **Time**.
5. Under **Repeat**, choose how often, like **Daily**, **Weekly**, **Every 2 weeks** or **Monthly**. Choose **Never** for one run.
6. Choose the button with the time, like **Send tomorrow at 9:00 AM**.

The schedule shows under **Runs**, with its next run and how often it repeats. An agent can have more than one schedule, and a schedule repeats at most once an hour.

Anyone who can use an agent can schedule it for themselves. Their runs are their own.

## How a run works

Each run starts a new task in your chat. It works in the background, waits there for your approvals, and reports back there when it's done, like any task. See [Tasks](/docs/use-dvina/features/tasks).

If the last run is still working or still waiting for you when the next one is due, that run is skipped, and the schedule says **Skipped: its last run still waits for you**.

## Test a schedule

To see what a run does without waiting for it, open the schedule's menu (**···**) and choose **Test now**. A test run starts at once and reports back like any run. It doesn't change the schedule.

## See how runs went

In the schedule's menu (**···**), choose **Run history**. The history shows the latest runs, newest first, with when each ran and how it went: **Running**, **Waiting for you**, **Done**, **Failed**, **Didn't finish**, **Stopped** or **Skipped**. A test run is marked **Test**. Choose a run to open its task.

## Pause, resume or change a schedule

In the schedule's menu (**···**):

- **Pause:** The schedule stops running until you resume it.
- **Resume:** The schedule runs again. A paused schedule also shows **Resume** next to it.
- **Edit:** Change what it does, the time or how often it repeats.
- **Cancel:** The schedule is removed.

## When a schedule pauses itself

So an agent doesn't keep working for no one, Dvina pauses its schedule and tells you why when:

- **Three runs fail in a row:** **Paused after three failed runs in a row**. Open the schedule to see why. A test run doesn't count.
- **You're away:** If you haven't opened Dvina in 30 days, your agents' schedules pause: **Paused while you were away**.
- **Nobody opens its runs:** If a schedule ran many times over the last 60 days and you opened none of them: **Paused: its recent runs went unopened**.
- **The agent is gone:** If the agent was deleted or is no longer shared with you: **Paused: this agent is no longer available to you**.

To start it again, choose **Resume**.

## Tips

- **Test before you rely on it.** Choose **Test now** after you write the instruction, then refine it from what came back.
- **Write into one document.** Pick a document under **Write into**, and each run adds a new version of it. See [Knowledge, skills and output](/docs/use-dvina/agents/knowledge-skills-and-output#choose-the-output).
- **Let it ask.** A run waits for your approval before it sends, pays or deletes anything, so it's safe to schedule a job that drafts replies.

## Related

- [Tasks](/docs/use-dvina/features/tasks)
- [Agent permissions](/docs/use-dvina/agents/permissions)
- [Agents and Proactive](/docs/use-dvina/agents/proactive-agents)
- [One Chat](/docs/use-dvina/features/one-chat)
