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

# Schedules

> Run your agent automatically on a timer — daily digests, weekly reports, one-off tasks, or any cron schedule.

Schedules let your agent run itself without anyone sending a message. Set a time, describe what you want done, and the agent fires automatically on that cadence.

Common uses: sending a daily summary to a Slack channel, generating a weekly report, checking an external feed and emailing you if something changed, running a one-off cleanup task at a specific date and time.

## Setting up a schedule

Go to your agent's **Schedules** page in the dashboard and click **Add schedule**.

Each schedule has two parts:

1. **When to run** — pick a frequency and time, or write a raw cron expression
2. **Task notes** — the instruction the agent receives each time it fires (what to actually do)

### Frequency options

| Option        | Description                                           |
| ------------- | ----------------------------------------------------- |
| Once          | Runs one time on a specific date and time, then stops |
| Daily         | Runs every day at the time you choose                 |
| Weekly        | Runs on a specific day of the week                    |
| Monthly       | Runs on a specific day of the month                   |
| Custom (cron) | Full 5-field cron expression for any schedule         |

All times are stored in the timezone you choose. UTC is the default.

### Cron expressions

Switch a schedule to **Cron** mode to enter a standard 5-field expression:

```
┌───── minute (0–59)
│ ┌───── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌───── month (1–12)
│ │ │ │ ┌───── day of week (0–6, 0 = Sunday)
│ │ │ │ │
* * * * *
```

Examples:

| Expression      | Meaning                       |
| --------------- | ----------------------------- |
| `0 9 * * 1`     | Every Monday at 09:00         |
| `30 17 * * 1-5` | Weekdays at 17:30             |
| `0 8 1 * *`     | First of every month at 08:00 |
| `*/15 * * * *`  | Every 15 minutes              |

## Task notes

Task notes are the instruction the agent sees when the schedule fires — think of it as the message you'd type if you were triggering it manually.

Be specific. Instead of "do the weekly report", write something like:

> Pull this week's activity summary and post it to the #updates Slack channel. Flag any items where revenue dropped more than 10% week-over-week.

The agent runs with its full configuration — its purpose, tools, connectors, and memory — so you only need to describe the specific task for this run, not re-explain everything.

## Delivery

By default a scheduled run's output is saved to the schedule's History and visible in the **History** modal — that's it. To push the output somewhere, pick a **Delivery** target on the schedule:

| Delivery kind               | Target                                                                           |
| --------------------------- | -------------------------------------------------------------------------------- |
| No delivery                 | (default) — result shown in the History modal only.                              |
| Email                       | An email address.                                                                |
| Slack                       | A channel id (e.g. `C01234567`) or `#channel-name`.                              |
| Telegram                    | A numeric chat id.                                                               |
| Webhook (HTTPS POST)        | An `https://…` URL. The agent POSTs the output to it.                            |
| Inbox (in-app conversation) | Leaves the result as a conversation in the agent's [Inbox](/sidebar-menu/inbox). |

You also pick a **Delivery format** — `markdown` (default), `text`, `json`, or `artifacts_only`.

## Run guards

Each schedule has three per-run guards you can tune:

* **Max steps** — maximum LLM/tool steps for a single run (1–100, default 20).
* **Timeout** — maximum wall-clock duration per run, 5s–10min (default 2 minutes).
* **Credit budget** — optional ceiling on credits a single run is allowed to spend (1–1,000,000). Leave blank for no limit.

The runtime aborts the run as soon as any guard trips.

## Spend budget

Separate from the per-run **Credit budget** guard, each schedule has a cumulative **Spend budget** — a ceiling on the *total* credits this schedule may spend across a period, not just within a single run. It lives in its own fieldset on the schedule card:

* **Spend cap (credits)** — the ceiling (up to 1,000,000). Leave `0` for no limit.
* **Budget period** — **Daily** (per day), **Weekly** (Mon–Sun), or **Monthly** (calendar month).

When a cap is set, the card shows a live **Spent this period: X / Y credits** tracker. Once cumulative spend reaches the cap, every further run is **skipped** — the card shows *budget reached — runs skipped until the period resets* — until the period rolls over (UTC), when the counter resets to zero. This is independent of the per-run credit budget: the per-run guard caps one run, the spend budget caps the schedule's total over the period.

## Examples

**Hello world — a daily reminder.** A schedule that fires each morning with task notes "Post 'Good morning! Standup is at 9:30.' to the team." Delivery: Slack → `#team`. The simplest autonomous run.

**Simple — a weekly digest.** Fire every Monday at 8am. Task notes: "Summarise last week's activity and email it to me." Delivery: Email. The agent runs with its full config (tools, data, memory) and produces the digest unattended.

**Medium — a monitored report with guards.** Fire daily. Task notes: "Pull yesterday's sales numbers via the orders connector, flag anything down >10% week-over-week, and post to #updates." Set a **Credit budget** of 200 and a **Timeout** of 3 minutes so a misbehaving run can't overspend. Delivery: Slack, format `markdown`.

**Complex — a multi-step autonomous workflow with webhook delivery.** Fire hourly during business hours. Task notes describe a multi-step task: "Check the support inbox via the connector, triage any new tickets by severity, draft responses for the low-severity ones, and for high-severity ones gather the relevant account context." Raise **Max steps** to 40 for the multi-tool work, set a **Credit budget** ceiling, and deliver to a **Webhook** that feeds your ticketing system. Use **Run now** to test it before trusting it on a schedule, and watch the **History** modal to review each run's detailed execution trace and tune the task notes until the runs are reliable.

**Complex — a hard monthly spend ceiling.** Cap total spend, not just per-run: set **Spend budget** → cap 2,000 credits, period **Monthly**. An hourly schedule can burn through its per-run 50-credit cap on every fire, but once cumulative spend for the month hits 2,000 the card shows *budget reached* and every further run is skipped until the 1st resets it — a hard monthly ceiling independent of the per-run cap.

## Run now and history

Each schedule card has a **Run now** button — fires the schedule immediately as a manual run. The result shows up in the History modal alongside automated runs.

Click **History** on a card to see the most recent 20 runs for that schedule, including trigger (manual vs cron), status, duration, credits spent, delivery outcome, and a preview of the output. Each run links to a detailed execution trace.

## Enable and disable

Each schedule has an ON / OFF toggle. Disabled schedules are preserved with their configuration but don't fire. You can re-enable them at any time without reconfiguring.

## Activity log

Every scheduled run shows up in the **Activity** page the same as any other conversation. You'll see the task notes that triggered the run, the agent's full response, tool usage, and cost.

## Limits

* Up to **50 active schedules** per agent (this limit may change).
* Task notes: up to 4,000 characters.
* Minimum interval: 1 minute (for cron mode).
* Schedules are owner-scoped — for subscriber scheduling, see the subscriber dashboard's own Schedules page.

## Manage via the Management MCP

This area is managed through the [Management MCP](/manage-mcp) at `https://manage.agentheya.com/mcp`.

|          |                                                                     |
| -------- | ------------------------------------------------------------------- |
| Endpoint | `https://manage.agentheya.com/mcp`                                  |
| Tools    | `list_schedules, create_schedule, update_schedule, delete_schedule` |

All tools take `owner_id` + `agent_id` as required arguments. See the [Management MCP guide](/manage-mcp) for authentication and the full tool catalogue.
