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

# Scheduler CLI

> CLI commands for scheduling periodic execution in TypeScript

# Scheduler CLI (TypeScript)

Schedule agents and recipes to run periodically using the praisonai-ts CLI.

## Installation

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
npm install -g praisonai-ts
```

## Commands Overview

| Command                             | Description           |
| ----------------------------------- | --------------------- |
| `praisonai-ts schedule start`       | Start a new scheduler |
| `praisonai-ts schedule list`        | List all schedulers   |
| `praisonai-ts schedule stop <name>` | Stop a scheduler      |
| `praisonai-ts schedule logs <name>` | View scheduler logs   |
| `praisonai-ts schedule stats`       | Show statistics       |

## Start a Scheduler

### With a Task

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Basic scheduler
praisonai-ts schedule start news-checker "Check AI news" --interval hourly

# With timeout and budget
praisonai-ts schedule start reporter "Generate report" \
    --interval daily \
    --timeout 300 \
    --max-cost 1.00
```

### With a Recipe

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Schedule a recipe
praisonai-ts schedule start news-monitor --recipe news-analyzer --interval hourly

# With all options
praisonai-ts schedule start my-scheduler \
    --recipe my-recipe \
    --interval "*/6h" \
    --timeout 600 \
    --max-cost 2.00 \
    --max-retries 3
```

### Start Options

| Option          | Description             |
| --------------- | ----------------------- |
| `--recipe`      | Recipe name to schedule |
| `--interval`    | Schedule interval       |
| `--timeout`     | Timeout per execution   |
| `--max-cost`    | Maximum budget in USD   |
| `--max-retries` | Maximum retry attempts  |

### Interval Formats

| Format   | Description      |
| -------- | ---------------- |
| `hourly` | Every hour       |
| `daily`  | Every day        |
| `*/30m`  | Every 30 minutes |
| `*/6h`   | Every 6 hours    |

## List Schedulers

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

## Stop a Scheduler

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts schedule stop news-checker
```

## View Logs

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts schedule logs news-checker
praisonai-ts schedule logs news-checker --follow
```

## Show Statistics

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts schedule stats
praisonai-ts schedule stats news-checker
```

## Examples

### Complete Workflow

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 1. Start a recipe scheduler
praisonai-ts schedule start news-monitor \
    --recipe news-analyzer \
    --interval hourly

# 2. List schedulers
praisonai-ts schedule list

# 3. Check logs
praisonai-ts schedule logs news-monitor --follow

# 4. View stats
praisonai-ts schedule stats news-monitor

# 5. Stop when done
praisonai-ts schedule stop news-monitor
```

### Multiple Schedulers

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Start multiple
praisonai-ts schedule start hourly-news --recipe news-monitor --interval hourly
praisonai-ts schedule start daily-report --recipe report-generator --interval daily

# List all
praisonai-ts schedule list

# Stop all
praisonai-ts schedule stop hourly-news
praisonai-ts schedule stop daily-report
```

## See Also

* [Scheduler SDK](/docs/js/scheduler) - TypeScript API
* [Background Tasks CLI](/docs/js/background-tasks-cli) - Background tasks
* [Async Jobs CLI](/docs/js/async-jobs-cli) - Server-based jobs
