# Automations

Put agents on a timer, start them from a webhook, run them in Machine Cloud on a schedule, and resume work after a usage limit.

Canonical page: https://themachine.myapps.ai/docs/code/automations

Click **Automations** in the sidebar. The screen has four parts.

![The Automations screen: a schedule for the bakery site, no webhooks yet, auto-resume off, and the Machine Cloud section](/images/docs/code/automations.webp)

## Schedules on this computer

Put an agent on a timer, like a nightly test run or a Monday summary.

1. Click **New schedule**.
2. Give it a name, write what the agent should do, choose the project, model,
   mode, and where it runs, and set when it runs.

![The New schedule dialog with a name, a prompt, the project, model, mode, and isolation filled in](/images/docs/code/new-schedule.webp)

Schedules on this computer run only while Machine Code is running and the
computer is awake.

## Webhooks on this computer

A webhook starts an agent when another program calls a secret address on
your computer, for example a local script or a test runner.

1. Click **New** next to **Webhooks on this computer**, fill in **New webhook
   on this computer**, and click **Create webhook**.
2. Click **Copy curl** for a ready-made command that calls it.
3. Click **Run now** to try it.

The address only listens on your own computer. Keep it secret: anyone with
the address who can reach your computer can start the agent.

## In Machine Cloud

Automations here run in Machine Cloud, so they work with your computer off.
Click **New cloud automation** and pick how it starts:

| Type | When it runs |
|---|---|
| **On a schedule** | Repeatedly, for example every weekday at 8:00. |
| **Once** | One time, at the date and time you choose. |
| **From a webhook** | Whenever a web address is called. |
| **Watch a command** | When a command's output changes. |

These are your Machine project's triggers, the same ones you see on the
Machine web app and in [Machine Desktop](/docs/desktop/automations/overview).

## Auto-resume after usage limits

If an agent stops because a plan hit its usage limit, auto-resume waits until
the limit resets and then carries on. It's **Off** by default. Click **Turn
on** to use it, or **Resume now** to carry on straight away.
