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

# Schedule prompts

A schedule sends a prompt to one of your Cloud chats on its own: a summary every morning, a check every hour, a
reminder once next Tuesday. It runs in the cloud, so your computer can be off. The answer waits in that chat, after
its earlier messages.

## Schedule your first prompt

The quickest way starts from the chat you want the answers in.

1. Open a chat in one of your [Cloud workspaces](https://haarness.ai/docs/cloud/workspaces.md).
2. Open the workspace menu at the top and choose **Schedule a prompt**. The form opens with that workspace and chat
   already selected.
3. Give the schedule a **Name**, such as "Morning summary".
4. Write the **Prompt** exactly as you would type it in the chat.
5. Under **When**, pick how often it runs and at what time. The **Next runs** list shows the next five times, so
   you can check it before you save.
6. Choose **Create schedule**.

You can also start from **Schedules → New schedule** in the sidebar and pick the workspace and chat there.

> A schedule needs a chat to post into. If the workspace has no chat yet, open the workspace, send any message, then
> come back.

## Choose when it runs

| Option | Runs | Example |
| --- | --- | --- |
| **Once** | On one date and time | Next Friday at 17:00 |
| **Every few minutes or hours** | After a fixed amount of time, again and again | Every 15 minutes |
| **Every hour** | At the same minute past each hour | At 05 past |
| **Every day** | At the same time each day | 09:00 |
| **Every weekday** | Monday to Friday at one time | 08:30 |
| **Every week** | On the days you pick, at one time | Mon and Thu at 10:00 |
| **Every month** | On one day of the month | Day 1 at 07:00 |
| **Custom rule** | A five-field cron rule | `0 9 * * 1-5` |

The shortest interval is one minute, and the longest is one year.

### Custom rules

A custom rule is a standard cron rule with five fields: minute, hour, day of the month, month and day of the
week. It is read in the schedule's time zone.

| Rule | Runs |
| --- | --- |
| `0 9 * * 1-5` | At 09:00, Monday to Friday |
| `30 18 * * 5` | At 18:30 every Friday |
| `0 */4 * * *` | Every four hours, on the hour |
| `0 8 1,15 * *` | At 08:00 on the 1st and the 15th |

The form tells you when a rule is not valid, or when it can never run (for example, 31 February).

## Time zones and daylight saving

Every schedule has a time zone. It starts as your own, and you can search for any city. Times are read in that
zone, so "every day at 09:00 in Tokyo" stays at 09:00 Tokyo time. The schedule page also shows each run in your
own time when the two differ.

When the clocks change, a schedule keeps its **wall-clock time**:

- **A daily 09:00 run stays at 09:00** after the clocks change, in winter and in summer.
- **When the clocks go forward,** a time that does not exist that night (such as 02:30) runs at the end of the gap
  instead (03:00). The form warns you with **Clocks change** in the list of next runs.
- **When the clocks go back,** a time that happens twice (such as 01:30) runs once, the first time.
- **"Every few minutes or hours" counts real elapsed time**, starting from its first run. "Every 2 hours" stays
  exactly 2 hours apart through a clock change, and never drifts.
- **Monthly on the 29th, 30th or 31st** skips months that do not have that day.

## What happens at run time

At each run, Cloud sends the prompt to the chat as if you had typed it. It uses the workspace's model, instructions
and permissions.

- **The workspace is asleep?** It wakes up for the run and goes back to sleep when idle. You do not need to keep it
  running. If it has not started within ten minutes, the run fails.
- **The agent needs a decision?** The run shows **Needs your approval**. Open the chat to approve or deny; the
  run continues from there.
- **The previous run is still going?** A repeating schedule skips that time and runs at the next one, so runs
  never pile up.
- **You are chatting at the same moment?** The scheduled prompt is sent once the agent finishes its current
  answer.
- **No questions.** A scheduled prompt cannot ask you a question; the agent works with what the prompt says. It
  still asks for approval when the workspace's permissions require it.

Runs use your plan's compute and credits, like any other message. See [Credits and
plans](https://haarness.ai/docs/cloud/credits-and-plans.md).

## Check how it went

Open the schedule from **Schedules** to see:

- when it runs next, in its own zone and in yours;
- the prompt it sends and the chat it posts in;
- every run, with its status and a link to the answer in the chat.

| Status | Means |
| --- | --- |
| **Starting** | The workspace is waking up or the prompt is on its way |
| **Running** | The agent is working on it |
| **Needs your approval** | The agent is waiting for you in the chat |
| **Completed** | The answer is in the chat |
| **Failed** | The run could not finish; the reason is shown under it |
| **Interrupted** | The answer stopped before it finished, for example because the workspace was stopped |
| **Cancelled** | The run was cancelled before it started |

## Run it now, pause, edit or delete

- **Run now** sends the prompt immediately, without changing the next scheduled time. If a run is already in
  progress, wait for it to finish first.
- **Pause** with the switch on the schedule or in the list. Nothing runs while it is paused. When you turn it back
  on, it continues at its next time; missed times are not caught up.
- **Edit** changes the name, prompt, timing or time zone. To post into a different chat, create a new schedule.
- **Delete** from the schedule's menu. Future runs are cancelled. An answer already in progress keeps going, and the
  chat keeps its history.

A **Once** schedule shows **Done** after it runs. Use **Run now** to send it again, or **Edit** to pick a new time.

## When a schedule stops by itself

- **The chat is archived:** the schedule pauses. Create a new schedule to post into another chat.
- **The workspace is deleted:** its schedules are deleted with it.
- **The person who created it leaves the team, or becomes a Viewer:** its runs fail. Create the schedule again as
  someone who works in the team's workspaces.
- **Your plan or credits run out:** the run fails with a reason, and the next run tries again. See [Credits and
  plans](https://haarness.ai/docs/cloud/credits-and-plans.md).

## Schedules on your own computer

Cloud schedules run in Cloud workspaces. To run a prompt on a schedule on your own machine, for example against a
local repository, use [scheduled runs in the CLI](https://haarness.ai/docs/cli/schedules.md). They need your computer to be on.

## Automate schedules

Everything on this page is also available from the [Cloud API](https://haarness.ai/docs/cloud/api.md). Create an [API
key](https://haarness.ai/docs/cloud/cli-and-sdk.md#create-an-api-key) with the **Read schedules** and **Manage schedules** permissions.
