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

# Schedule

> Scheduler management for automated agent execution

The `schedule` command manages scheduled agent execution.

## Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule [OPTIONS] COMMAND [ARGS]...
```

## Commands

| Command              | Description                            |
| -------------------- | -------------------------------------- |
| `add`                | Add a scheduled job                    |
| `start`              | Start scheduled agent execution        |
| `stop`               | Stop scheduled job(s)                  |
| `list`               | List scheduled jobs                    |
| `logs`               | View scheduler logs                    |
| `restart`            | Restart a scheduled job                |
| `delete`             | Delete a scheduled job                 |
| `describe`           | Show job details                       |
| `stats`              | Show scheduler statistics              |
| `blueprint`          | Create a job from a blueprint template |
| `blueprint-list`     | List available blueprints              |
| `suggestions`        | List pending automation suggestions    |
| `suggestion-accept`  | Accept a suggestion and create the job |
| `suggestion-dismiss` | Dismiss a suggestion                   |
| `suggestion-propose` | Propose a blueprint as a suggestion    |

## Adding Jobs

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "job-name" \
  --schedule "cron:0 9 * * *" \
  --message "Good morning! Check tasks." \
  --agent support \
  --channel telegram \
  --channel-id 12345
```

### Options

| Option                             | Short | Description                                                                                                                                                                                                                       |
| ---------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--schedule`                       | `-s`  | When to run: `hourly`, `daily`, `weekly`, `*/30m`, `cron:...`, `at:...`, `in 20 minutes`                                                                                                                                          |
| `--message`                        | `-m`  | Prompt text to deliver                                                                                                                                                                                                            |
| `--agent`                          | `-a`  | Agent ID to execute this job (default: first registered)                                                                                                                                                                          |
| `--deliver`                        | `-d`  | Delivery token: `origin`, `telegram`, `all`, or `platform:chat_id[:thread_id]`. See [Scheduler Delivery](/docs/docs/features/scheduler-delivery) for the full token grammar and Python/YAML equivalents.                               |
| `--continuable / --no-continuable` |       | Default `--continuable`. Seed a resumable session on delivery so a reply resumes the job with context. Use `--no-continuable` for fire-and-forget notifications (pure alerts). Applied only when a delivery target is configured. |
| `--pre-run`                        |       | Cheap pre-run gate command: exit 0 + output → run (output seeds the prompt); non-zero → skip (no model tokens, no delivery)                                                                                                       |
| `--condition`                      |       | Natural-language / expression alias for the pre-run gate (advisory)                                                                                                                                                               |
| `--channel`                        |       | \[Legacy] Delivery platform: `telegram`, `discord`, `slack`, `whatsapp`                                                                                                                                                           |
| `--channel-id`                     |       | \[Legacy] Target chat/channel ID                                                                                                                                                                                                  |
| `--session-id`                     |       | Session ID to preserve conversation context                                                                                                                                                                                       |
| `--json`                           |       | Output JSON                                                                                                                                                                                                                       |

## Examples

### Add a daily reminder bound to a specific agent

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "morning-hello" -s daily -m "say hello" --agent support
```

### Add a weekly digest

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "weekly-digest" -s weekly -m "Summarise the week's activity" --deliver telegram
```

`weekly` runs every 7 days (604800 seconds).

### Fire-and-forget alert

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "backup-alert" -s "cron:0 3 * * *" -m "Backup ok" \
  --deliver "slack:C012345" \
  --no-continuable
```

A reply in `#C012345` lands as a brand-new turn instead of resuming the maintenance job's conversation. Without `--no-continuable`, a delivered result is [continuable by default](/docs/docs/features/scheduler-delivery#continuable-delivery) — a reply resumes the job's conversation with the brief in context.

### Deliver via home channel

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "news" -s daily -m "summarise AI news" --deliver telegram
```

Run `/sethome` in the target chat first.

### Deliver into a thread

Append a third `:thread_id` segment to thread the outbound message — a Slack thread `ts`, a Telegram forum topic id, or a Discord thread id:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "standup" -s "cron:0 9 * * 1-5" -m "post the standup summary" \
  --deliver slack:C0123456:1728987654.001234
```

The router preserves the thread segment end-to-end, so the message lands in the Slack thread rooted at message ts `1728987654.001234`. Adapters without thread support silently ignore the segment. See [Scheduler Delivery → Thread semantics](/docs/docs/features/scheduler-delivery#thread-semantics-per-platform).

### Fire-and-forget notice

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "backup-notice" -s daily \
  -m "post the backup-complete notice" \
  --deliver slack:C0123456 \
  --no-continuable
```

`--no-continuable` opts out of session seeding, so a reply starts a fresh session instead of resuming the job. See [Continuable Delivery](/docs/docs/features/scheduler-delivery#continuable-delivery).

### Fan-out to all home channels

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "ops-digest" -s "cron:0 * * * *" -m "incident digest" --deliver all
```

### Deliver back to origin chat

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "stretch" -s "*/2h" -m "time to stretch" \
  --deliver origin --channel telegram --channel-id 12345
```

`origin` requires `--channel` and `--channel-id` so the executor can resolve the creating chat.

## Blueprints & Suggestions

Create jobs from reusable templates, or accept consent-first suggestions — the same engine that powers the `/automations` and `/blueprint` chat commands. See [Automation Suggestions](/docs/docs/features/automation-suggestions) for the concepts.

### `blueprint`

Create a schedule from a blueprint template.

| Option             | Description                                           |
| ------------------ | ----------------------------------------------------- |
| `--hour`           | Delivery hour (0-23)                                  |
| `--minute`         | Delivery minute (0-59)                                |
| `--weekdays`       | Days: `mon-fri`, `daily`, `weekends`, or a single day |
| `--focus`          | Focus area                                            |
| `--interval`       | Interval in minutes (for interval-based blueprints)   |
| `--keywords`       | Priority keywords (for `important-mail`)              |
| `--deliver` / `-d` | Delivery target                                       |
| `--agent` / `-a`   | Agent ID                                              |
| `--json`           | Output JSON                                           |

### `blueprint-list`

List available blueprints (built-in + user YAML).

| Option              | Description        |
| ------------------- | ------------------ |
| `--category` / `-c` | Filter by category |
| `--json`            | Output JSON        |

### `suggestions`

List pending automation suggestions.

| Option   | Description |
| -------- | ----------- |
| `--json` | Output JSON |

### `suggestion-accept`

Accept a suggestion and create the schedule job.

| Argument / Option  | Description              |
| ------------------ | ------------------------ |
| `<id>`             | Suggestion ID to accept  |
| `--deliver` / `-d` | Override delivery target |

### `suggestion-dismiss`

Dismiss a suggestion without creating a job.

| Argument | Description              |
| -------- | ------------------------ |
| `<id>`   | Suggestion ID to dismiss |

### `suggestion-propose`

Propose a blueprint as a suggestion (manual/CLI trigger).

| Option             | Description                                           |
| ------------------ | ----------------------------------------------------- |
| `--reason` / `-r`  | Why this is being suggested                           |
| `--hour`           | Delivery hour (0-23)                                  |
| `--minute`         | Delivery minute (0-59)                                |
| `--weekdays`       | Days: `mon-fri`, `daily`, `weekends`, or a single day |
| `--focus`          | Focus area                                            |
| `--interval`       | Interval in minutes                                   |
| `--keywords`       | Priority keywords (for `important-mail`)              |
| `--deliver` / `-d` | Suggested delivery target                             |

### Examples

<CodeGroup>
  ```bash Create from a blueprint theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  praisonai schedule blueprint morning-brief \
    --hour 8 --weekdays mon-fri --deliver telegram
  ```

  ```bash Accept a suggestion theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
  praisonai schedule suggestions
  # copy the [sug_...] id from the output, then:
  praisonai schedule suggestion-accept sug_abc123 --deliver telegram
  ```
</CodeGroup>

### Add with delivery target \[Legacy]

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "tg-reminder" \
  -s "cron:0 9 * * *" \
  -m "check email" \
  --agent support \
  --channel telegram \
  --channel-id 12345
```

### Start scheduler

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule start
```

### List scheduled jobs

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule list
praisonai schedule list --json
```

### View logs

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule logs
praisonai schedule logs --tail 100 --follow
```

### Stop a job

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule stop job-123
praisonai schedule stop all
```

### Delete a job

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule delete job-123 --yes
```

### Skip the model turn when there are no new emails

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai schedule add "inbox-watch" \
  -s "*/5m" \
  -m "Summarise new emails" \
  --pre-run "scripts/new_mail.sh" \
  --deliver telegram
```

`--pre-run` runs `scripts/new_mail.sh` before each tick. Exit 0 + stdout → agent runs with that stdout appended to the message. Non-zero exit → tick is skipped, no tokens spent, no Telegram ping.

<Note>
  `--pre-run` is a trusted, human-configured surface — it is not accepted by the agent-callable `schedule_add` tool, which prevents a prompt-injected agent from persisting arbitrary shell commands on the host. Configure `--pre-run` only via the CLI, YAML, or Python.
</Note>

## See Also

* [Scheduler Delivery](/docs/docs/features/scheduler-delivery) - Push scheduled results to Telegram/Discord/Slack/WhatsApp from Python, YAML, or CLI
* [Automation Suggestions](/docs/docs/features/automation-suggestions) - Consent-first suggestions and blueprint templates
* [Proactive Delivery](/docs/docs/features/proactive-delivery) - Home channels and delivery tokens
* [Scheduler](/docs/docs/cli/scheduler) - Scheduler details
* [Background](/docs/docs/cli/background) - Background tasks
