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

# Test Lists & Schedules

> Run a group of tests together, and run a project or a test list on a cron schedule, from the CLI.

Test lists and schedules work the same as in the Portal; see [Test Lists](https://docs.testsprite.com/web-portal/maintenance/test-lists.md) and [Test Schedules](https://docs.testsprite.com/web-portal/maintenance/monitoring.md). This page covers the commands.

## Run a group of tests

```bash theme={null}
testsprite testlist create --name smoke --project-env <project-id>:staging
testsprite testlist add <list-id> <test-id-1> <test-id-2>
testsprite testlist run <list-id> --wait
```

`--project-env <project-id>:<env>` sets the environment that project's tests run in; repeat it for each project in the list. To run only part of the list, pass `--case <test-id>` to `testlist run`. A loopback environment opens a [tunnel](https://docs.testsprite.com/cli/core/local-apps.md) automatically.

## Run on a schedule

```bash theme={null}
testsprite schedule create --name nightly --cron "0 3 * * *" \
  --target-type testList --target-id <list-id>
```

To schedule a whole project, use `--target-type project --target-id <project-id>`. Without `--env`, a project schedule runs on the project's Default environment each time it fires; add `--env staging` to pin it. A test-list schedule uses the list's environments and rejects `--env`; change them with `testlist update --project-env`.

`schedule create` prints the estimated credits per run. Schedules need a workspace plan that includes them (exit `13` otherwise).

## Pause, change, or check a schedule

```bash theme={null}
testsprite schedule update <schedule-id> --pause
testsprite schedule update <schedule-id> --env staging
testsprite schedule run list <schedule-id>
```

`--resume` turns a paused schedule back on. `schedule list` shows each schedule's environment: `staging (pinned)` or `project default (inherits)`.

A schedule on a loopback environment can't reach your machine from the cloud. Its runs are recorded as <kbd>blocked</kbd> and not charged (`failureKind: network`); run the tests with `test run --local <port>` instead.

For every flag, see [Command Reference](https://docs.testsprite.com/cli/reference/command-reference.md).


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