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

# Run an AI agent on a schedule with cron

> Run an AI agent on a cron schedule: create a schedule trigger with reliant trigger create, or declare one in a workflow, then check each firing and its run.

By the end of this guide an agent runs in your repository every weekday at 9am, without you starting it, and you can see each firing and open the run it started. A schedule is a **trigger**. You can create one from the terminal, or declare it in a workflow's YAML so anyone who uses the workflow can turn it on. This guide does both. [Schedules](https://docs.reliantlabs.io/automations/schedules.md) lists every option.

## Before you begin

* The `reliant` CLI, v1.21 or later, signed in ([Sign in and tokens](https://docs.reliantlabs.io/cli/sign-in.md)).
* A Reliant project for the repository, and a connected machine that holds it ([Run a machine from the terminal](https://docs.reliantlabs.io/cli/run-a-machine.md)). You need the machine's hostname or ID for `--daemon`.
* In an organization: an organization AI account that scheduled runs can use. See [What this does not do](#what-this-does-not-do).

**1. Create a schedule trigger**

Run this from the repository. `--project` defaults to the working directory. Always pass `--workflow`: `builtin://agent` is the stock agent.

```bash terminal theme={null}
reliant trigger create --name morning-readme-check \
  --cron "0 9 * * 1-5" --timezone America/New_York \
  --workflow builtin://agent --daemon build-box \
  --overlap skip --catchup-window 15m \
  --message "Read the repository and list anything in README.md that no longer matches the code. Do not change any files."
```

```text theme={null}
Name:                guides-sandbox-schedule
ID:                  2749c983-559a-425c-a712-d857684c118f
State:               enabled
Workflow:            builtin://agent
Unattended funding:  org_only (its runs spend only the organization's AI accounts)
Schedule:            41 7 * * *
Timezone:            UTC
Overlap:             skip
Catchup window:      10m0s
Next fire:           2026-11-20T07:41:00Z
...
```

This output came from a test trigger that fired a few minutes later. `--overlap skip` (the default) records a skipped firing instead of starting a second run on top of one still going. `--catchup-window` limits how late a firing missed during an outage may still run.

**2. Or declare the schedule in a workflow**

A `triggers:` block keeps the schedule beside the workflow it runs. Declaring it fires nothing.

```yaml .reliant/workflows/repo-summary.yaml theme={null}
name: repo-summary
description: Every weekday morning, an agent checks the README against the code.

triggers:
  - name: weekday-morning
    schedule:
      cron: ["0 9 * * 1-5"]
      timezone: America/New_York
      overlap: skip
      catchup_window: 15m
    prompt: |
      Read the repository and list anything in README.md that no longer
      matches the code. Do not change any files.

entry: [summarise]

nodes:
  - id: summarise
    type: workflow
    ref: builtin://agent
    args:
      mode: plan
```

`mode: plan` gives the agent read-only tools. Check the file with `reliant workflow validate` and `reliant workflow lint`, then commit it. Lint warns `[no-failure-path]` until the workflow has an `on_failure:` step that tells someone. Then turn the schedule on, which is the app's **Enable** dialog as a command:

```bash terminal theme={null}
reliant trigger activate --workflow repo-summary --machine build-box \
  --name-prefix guides-sandbox-schedule
```

```text theme={null}
TRIGGER          OUTCOME  ACTIVATION                                                                        NOTE
weekday-morning  enabled  guides-sandbox-schedule · weekday-morning (a764c0ae-d126-445f-af96-5dac7535ac88)  -
```

The activation re-reads the `triggers:` block on every firing, so a cron edit you commit takes effect without activating again.

**3. Verify it fires**

`trigger list` shows the next and last firing. `trigger events` lists firings with the run each one started:

```bash terminal theme={null}
reliant trigger list
reliant trigger events "guides-sandbox-schedule · weekday-morning"
```

```text theme={null}
NAME                                       STATE    HEALTH   SCHEDULE    ...  WORKFLOW      NEXT FIRE             LAST
guides-sandbox-schedule · weekday-morning  enabled  unknown  32 7 * * *  ...  repo-summary  2026-11-21T07:32:00Z  launched at 2026-11-20T07:32:00Z
OCCURRED AT           OUTCOME   CHAT                                  DEFINITION
2026-11-20T07:32:00Z  launched  e6a5726f-4dd1-50ef-a0f6-f65a1f8c8b3c  machine build-box at .reliant/workflows/repo-summary.yaml @ master 13ef0c7, clean ...
```

`launched` with a chat ID means the run started. **DEFINITION** records the exact commit of the workflow it ran. Follow the run with `reliant workflow follow <chat-id>`; it is also under **Workflows → Runs** in the app. To test without waiting for 9am, `reliant trigger fire <name>` runs it now.

**4. Pause or remove it**

```bash terminal theme={null}
reliant trigger disable morning-readme-check      # pause; enable resumes it
reliant trigger delete morning-readme-check
reliant trigger deactivate --workflow repo-summary  # pause every activation of a workflow
```

Deleting keeps the firing history and the runs it started.

## What this does not do

* **Nobody answers the agent.** Scheduled runs are unattended, so the agent is told to decide and proceed. A run that waits for an approval, or one that fails, shows up in your **Inbox**.
* **In an organization with two or more members, runs spend only the organization's AI accounts** by default (`Unattended funding: org_only`), never your own subscriptions. If no organization account can run the model, the firing fails. An admin fixes that in **Settings → Organization → AI accounts**. The CLI can only tighten funding, never widen it.
* **A machine that is off cannot run it.** A suspended [cloud machine](https://docs.reliantlabs.io/machines/cloud.md) is woken for the run. A laptop or server you run yourself must be online. Firings missed for longer than the catch-up window are dropped, not replayed.
* **Turning a schedule on is yours to do.** An agent can write the `triggers:` block. When an agent asks to enable an automation, you get an approval card by default ([Automation approvals](https://docs.reliantlabs.io/cli/workflows.md#put-it-on-a-schedule)).

## Troubleshooting

> [accordion] this automation runs only on its organization's AI accounts, and none of them can run the flagship model
>
> The firing launched, or tried to, but no organization account could run the model. `reliant trigger get <name>` shows `Health: degraded` with the same text. After two such failures in a row the trigger pauses itself (`State: paused`, `Health: failing`); run `reliant trigger enable <name>` once an account can run it. An admin can add an organization API key or turn on Reliant credits, or you can change the automation's model. A paused run continues by itself once an organization account can run it. `reliant workflow status` shows only `call_llm FAIL`. `reliant workflow follow <chat-id>` prints the full error.

> [accordion] LAST stays never and trigger events says No firings yet
>
> Check `Workflow:` in `reliant trigger get <name>`. A trigger created without `--workflow` shows `Workflow: -`. In reliant v1.21.3 its firings record nothing. Set a workflow with `reliant trigger update <name> --workflow builtin://agent` plus the trigger's other flags: `update` replaces the whole definition.

## Next steps

> [card] [Schedules reference](https://docs.reliantlabs.io/automations/schedules.md)
>
> Every schedule field, intervals, overlap and catch-up after an outage.

> [card] [First multi-agent workflow](https://docs.reliantlabs.io/guides/workflows/first-multi-agent-workflow.md)
>
> Write the workflow a schedule runs: planner, implementer and reviewer.

> [card] [Daily Slack digest](https://docs.reliantlabs.io/guides/workflows/daily-slack-digest.md)
>
> Post a scheduled agent's summary to a Slack channel.

> [card] [No-machine runs](https://docs.reliantlabs.io/automations/no-machine-runs.md)
>
> Schedule an agent that needs only the web and your integrations.


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