---
title: How Workers work
description: Understand a Worker's states and runs, which steps wait for your approval and for how long, schedules and time zones, and spending caps.
---

A **Worker** is a job Ysra does on a schedule or when you run it: read
something, do the work, and deliver a result. A Worker has a state (is it
switched on?) and each time it runs makes a **run** with its own state. This
page explains both, the approvals, and the caps. To make one, see
[Start a Worker from Ask](create.md).

## What a Worker never does alone

A Worker never sends, posts or changes anything outside Ysra without the
permission you gave it. Sending an email and posting a message always wait
for your approval of the exact text, every run, and that can't be turned
off; an action with no permission set is forbidden.

## Worker states

| State | What it means | What moves it on |
|---|---|---|
| **Not started** | Made, never switched on. Workers start like this. | Switch it on |
| **On** | Runs on its schedule (or when you press Run). | **Turn off** |
| **Turned off** | Keeps its settings and runs; no scheduled runs. | **Turn on** |
| Archived | Hidden from the list. | — |

> Diagram: A Worker is switched on or off; each time it runs makes a run.

## Run states

| State | What it means |
|---|---|
| **Queued** | Waiting for its turn. |
| **Working** | Running its steps. |
| **Waiting for you** | A step needs your approval of the exact text it will send. |
| **Trying again** | A step is being tried again. |
| **Done** | Finished. |
| **Failed** | Couldn't finish; the reason is on the run. |
| **Stopped** | You stopped it, rejected a step, or nobody approved within 7 days. |

> Diagram: A step that sends anything waits for your approval of the exact text.

## What happens when …

### A step needs your approval

The run waits and shows the exact text it will send (the email, the
message). **Approve & send** sends exactly that, once; **Reject** stops the
step. Approval is per run: approving once doesn't approve the next run.
Drafts are different: a draft stays in your mailbox and nothing leaves it, so
drafting doesn't ask.

### You don't answer an approval

After 7 days the run stops without doing it: "No one approved this within 7
days, so I didn't do it. Run it again when you're ready."

### A run reaches its spend cap

It stops, isn't retried, and says so: "This run reached its … spending
limit, so it stopped." When the Worker's daily cap is reached: "This Worker
reached its … limit for today, so it stopped. It runs again tomorrow."

### A step fails

The run ends **Failed** with the reason on the run. Runs aren't retried
automatically; **Run now** tries again.

### It was made from Ask

Each run posts one short line back into the Ask conversation it came from:
the summary, "N waiting for your approval.", "It couldn't finish this run.",
or "Finished.". Routine checks that find nothing new post only the first
time.

## What always needs your approval { #what-needs-approval-by-default }

| Made from | Waits for your approval |
|---|---|
| A description (Workers page, Set up with Ysra) | Sending email, notifications |
| Ask | Sending email, posting a chat message |

An action Ysra may take on its own is listed on the Worker; anything not
listed is forbidden. A step in the Worker's plan can make a rule stricter,
never looser.

## Schedules

| Rule | Value |
|---|---|
| Kinds | Manual, a time pattern (every Monday at 8:00), or an interval |
| Most often | Every minute (every 5 minutes when made from Ask) |
| Time zone | The Worker's own; UTC if none is set. Workers made by Set up with Ysra use your time zone. |

## Limits

| Limit | Value |
|---|---|
| Spend per run | 200 credits |
| Spend per Worker per day (UTC) | 1,000 credits |
| Steps per run | 12 |
| Tries per run | 1 (no automatic retry) |
| Approval waits | 7 days |

These limits, the approval rules and retries aren't changed in the app:
sending and posting always ask, and nothing else is configurable there.

## Related

- [Start a Worker from Ask](create.md) — writing the job and choosing what it may do.
- [Runs and approvals](runs.md) — reading a run and approving steps.
- [Schedules](schedules.md) — time patterns and intervals.
- [Limits and costs](../workspace/limits.md#workers) — every cap in one place.
