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

# Test Schedulers

> Automatically run your Playwright tests on a schedule using Stably's scheduler UI with simple and advanced configuration options

## Overview

Schedulers automatically run your Playwright tests on a schedule. Define when tests should run and which tests to run, and Stably handles the rest.

<Tip>
  Schedulers are stored in your repository's `stably.yaml` file, so they're version controlled. See the [YAML configuration guide](/run-tests/scheduled-runs) for manual editing.
</Tip>

## Creating a Scheduler

Create schedulers in the Stably dashboard with two modes:

<CardGroup cols={2}>
  <Card title="Simple Mode" icon="sliders">
    Choose from hourly, daily, weekly, or monthly schedules. Select projects from a dropdown.
  </Card>

  <Card title="Advanced Mode" icon="code">
    Write custom cron expressions and specify any CLI arguments for full control.
  </Card>
</CardGroup>

You can switch between modes at any time. The system automatically converts when possible.

## Schedule Frequency

### Simple Mode

* **Hourly**: Run every hour at a specific minute (0-59)
* **Daily**: Run once per day at a specific time
* **Weekly**: Run on specific days of the week at a specific time
* **Monthly**: Run on a specific day of each month (days 1-28 only)

All options support timezone selection.

### Advanced Mode - Cron Expressions

Advanced mode uses standard cron expressions:

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

Supports standard cron syntax: `*`, `*/n`, `n-m`, `n,m,o`

**Examples**:

* `*/15 * * * *` - Every 15 minutes
* `0 */6 * * *` - Every 6 hours
* `0 9,17 * * 1-5` - Every weekday at 9 AM and 5 PM

<Info>
  Use [crontab.guru](https://crontab.guru/) to validate and understand cron expressions.
</Info>

## Test Selection

**Simple Mode**: Select one or more Playwright projects from a dropdown. If none selected, all tests run.

**Advanced Mode**: Enter any valid `stably test` CLI arguments:

* `--project <name>` - Run specific projects
* `--grep <pattern>` - Filter tests by pattern
* `--workers <n>` - Control parallelism
* `--env <name>` - Set environment
* `--retries <n>` - Configure retries

**Note**: `--reporter` is blocked for security reasons.

## Timezone

Select a timezone to determine when your cron expression is evaluated. Defaults to **Pacific Time** (`America/Los_Angeles`) if not specified.

## Storage

Schedulers are stored in `stably.yaml` in your repository root:

```yaml stably.yaml theme={null}
schedules:
  scheduler-name:
    cron: "0 2 * * *"
    stablyTestArgs: "--project smoke"
    timezone: "America/Los_Angeles"
```

## Troubleshooting

**Schedules not running?** Verify `stably.yaml` is in the repository root and check your cron expression syntax using [crontab.guru](https://crontab.guru/).

**Tests run at wrong time?** Check your timezone setting—it defaults to Pacific Time if not specified.
