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

# Automations

> Make a coworker run on a schedule, or on an event from another service.

A coworker that only answers when you write to it is a chatbot. Two things make it a worker: scheduled tasks and webhook triggers.

Both open their own session, so an automated run never lands in the middle of your conversation, and both are fully recorded in **Monitoring** and **Logs**.

## Scheduled tasks

A scheduled task is a cron plus an instruction. When it fires, the coworker runs with no user message and follows that instruction.

Add one from the coworker **Scheduled runs** tab, or just ask the coworker to set it up.

**Name** `string`

Also decides the slug the task is addressed by.

**Instruction** `string`

What the coworker does when it fires, written as if you were talking to it. This is the whole prompt for that run.

**Cron** `string`

A standard 5-field expression. `0 9 * * 1` is every Monday at 9.

**Timezone** `string`

An IANA timezone, for example `Europe/Paris`. Set it, or the cron follows the timezone of your machine.

A task can also be a one-off: give it a date instead of a cron and it disables itself after it fires.

Each task can carry its own model, which is useful when a nightly job should run on something cheaper than your daily driver. Without one, it uses the coworker default.

> [!TIP]
>
> Test the instruction before putting it live. **Run now** fires the task immediately, works on a disabled task, and does not touch its schedule. From the API that is [`run_schedule_now`](https://docs.rerun.build/api/tools/schedules#run-schedule-now).

### Continuity between runs

A scheduled run opens a fresh session every time. The coworker does not remember last Monday's conversation.

What carries over is [memory](https://docs.rerun.build/concepts.md#memory) and the [database](https://docs.rerun.build/agents/data.md). If a task needs to know where it left off, tell it to write that down.

## Webhook triggers

A trigger gives the coworker a public URL. Whoever calls it starts a run, with the caller payload attached.

Add one from the **Triggers** tab. You get a URL to paste into the other service.

Write the instruction as if the event had already happened:

> A Stripe refund event arrives. Record it in the `refunds` table and tell me if the amount is over 500.

The payload lands right after your instruction, so the coworker does not have to fetch anything.

> [!WARNING]
>
> The URL is the credential. There is no signature and no secret header, so anyone holding it can fire your coworker. Do not paste it into a shared document or a public repository. Rotate it from the **Triggers** tab if it leaks.

By default a trigger accepts `POST` only. See [Webhook triggers](https://docs.rerun.build/api/webhooks.md) for the full HTTP contract: methods, response codes, size limits and how link previews are filtered out.

### Which one to use

| You want | Use |
| - | - |
| Something every morning, every Monday, every hour | A scheduled task |
| Something when another service says so | A trigger |
| Something once, at a date | A one-off scheduled task |
| Something on demand from your own script | A trigger, or [`send_message`](https://docs.rerun.build/api/tools/runs#send-message) |

## Unattended runs still pause for you

A coworker running at 3am can still stop and ask you a question or request an approval. The run pauses, you get notified, and it resumes from your answer whenever you give it.

This is deliberate: a coworker should not skip an approval just because nobody is watching. See [Human in the loop](https://docs.rerun.build/agents/human-in-the-loop.md).

## From the API

[`upsert_schedule`](https://docs.rerun.build/api/tools/schedules#upsert-schedule) and [`upsert_trigger`](https://docs.rerun.build/api/tools/triggers#upsert-trigger) do everything on this page, which is how you keep an automation setup in version control.


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