# Scheduled runs

A schedule is a cron expression, a sandbox spec and a command. Each run gets a fresh sandbox, which is destroyed when the command exits.

```
curl https://api.groundbox.dev/v1/schedules \
  -H "Authorization: Bearer $GROUNDBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cron": "0 3 * * *", "timezone": "UTC", "cmd": "./run-evals.sh", "sandbox": {"cpus": 4}}'
```

```
groundbox schedules create --cron "0 3 * * *" --name nightly --timezone Europe/Berlin --cpus 4 -- ./nightly.sh
groundbox schedules list
groundbox schedules rm <schedule_id>
```

`create` also takes `--memory-gb N`, `--template NAME` and `--secret NAME`. API: `POST /v1/schedules` (`schedules:write`), `GET /v1/schedules` (`schedules:read`) and `DELETE /v1/schedules/{id}` (`schedules:write`), which stops it; a run already started goes on. SDKs: `schedule_command`, `list_schedules` and `delete_schedule`. MCP: the `command` tool's `schedule` and `delete_schedule` actions, and `command_info` with action `schedules`.
