Skip to content

Commit c062c77

Browse files
Document checkly checks run (#455)
1 parent 1d6e737 commit c062c77

1 file changed

Lines changed: 58 additions & 3 deletions

File tree

cli/checkly-checks.mdx

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: checkly checks
3-
description: 'List, inspect, and analyze checks in your Checkly account.'
3+
description: 'List, inspect, run, and analyze checks in your Checkly account.'
44
sidebarTitle: 'checkly checks'
55
canonical: 'https://www.checklyhq.com/docs/cli/checkly-checks/'
66
---
77

88
<Note>Available since CLI v7.3.0. Analytics stats available since v7.6.0.</Note>
99

10-
The `checkly checks` command lets you list, inspect, and analyze checks in your Checkly account directly from the terminal. You can filter, search, and drill into individual check details, recent results, error groups, and analytics stats.
10+
The `checkly checks` command lets you list, inspect, run, and analyze checks in your Checkly account directly from the terminal. You can filter, search, run deployed checks on demand, and drill into individual check details, recent results, error groups, and analytics stats.
1111

1212
<Accordion title="Prerequisites">
1313
Before using `checkly checks`, ensure you have:
@@ -30,6 +30,7 @@ npx checkly checks <subcommand> [arguments] [options]
3030
|------------|-------------|
3131
| `list` | List all checks in your account. |
3232
| `get` | Get details of a specific check, including recent results and analytics stats. |
33+
| `run` | Run deployed checks now using their configured locations and alerting rules. |
3334
| `stats` | Show analytics stats for your checks. |
3435
| `delete` | Delete a check by ID. |
3536

@@ -183,6 +184,60 @@ npx checkly checks list --output=json
183184
npx checkly checks list --limit=10 --page=2
184185
```
185186

187+
## `checkly checks run`
188+
189+
<Note>The `checkly checks run` command is available since CLI v8.18.0.</Note>
190+
191+
Run deployed checks immediately using their configured locations and alerting rules. This is the CLI equivalent of selecting **Schedule now** in the Checkly dashboard.
192+
193+
<Warning>
194+
These are normal monitoring runs. They update check health and can trigger configured alerts. To run checks in a test session without affecting monitoring state or sending alerts, use [`checkly trigger`](/cli/checkly-trigger).
195+
</Warning>
196+
197+
**Usage:**
198+
199+
```bash Terminal
200+
npx checkly checks run [options]
201+
```
202+
203+
Without a selector, the command runs all eligible checks in your account. By default, it waits up to 600 seconds for every check session to finish and exits with a failing status code if a session fails, times out, or is cancelled.
204+
205+
**Options:**
206+
207+
| Option | Required | Description |
208+
|--------|----------|-------------|
209+
| `--tags, -t` | - | Select checks by tag. Use commas to require multiple tags, or repeat the option to match any filter. |
210+
| `--check-id` | - | Run specific checks by ID. Accepts comma-separated values and can be repeated. |
211+
| `--refresh-cache` | - | Refresh the selected checks cache before running. |
212+
| `--timeout` | - | Number of seconds to wait for all check sessions to finish. Default: `600`. |
213+
| `--detach, -d` | - | Start the check sessions and exit without waiting for results. |
214+
| `--[no-]fail-on-no-matching` | - | Fail when no checks match. Enabled by default. |
215+
| `--output, -o` | - | Output format: `table`, `json`, or `md`. Default: `table`. |
216+
217+
### Run Examples
218+
219+
```bash Terminal
220+
# Run one deployed check and wait for its result
221+
npx checkly checks run --check-id=<check-id>
222+
223+
# Run checks that have both the production and api tags
224+
npx checkly checks run --tags=production,api
225+
226+
# Run checks matching either tag filter
227+
npx checkly checks run --tags=production,api --tags=critical
228+
229+
# Schedule matching checks and exit immediately
230+
npx checkly checks run --tags=production --detach
231+
232+
# Return machine-readable results
233+
npx checkly checks run --check-id=<check-id> --output=json
234+
235+
# Exit successfully when no checks match
236+
npx checkly checks run --tags=optional --no-fail-on-no-matching
237+
```
238+
239+
The `--timeout` option only controls how long the CLI waits. Check sessions continue running in Checkly after the CLI times out. Use `--detach` when you do not need to wait for results.
240+
186241
## `checkly checks get`
187242

188243
Get details of a specific check, including recent results and analytics stats. Use `--result` to drill into a specific result, `--error-group` to view error details, or the stats flags to customize the analytics view.
@@ -610,5 +665,5 @@ npx checkly checks delete 12345 --force
610665
## Related Commands
611666

612667
- [`checkly status-pages`](/cli/checkly-status-pages) - List and inspect status pages
613-
- [`checkly trigger`](/cli/checkly-trigger) - Trigger checks on-demand
668+
- [`checkly trigger`](/cli/checkly-trigger) - Run deployed checks in a test session without affecting monitoring state
614669
- [`checkly whoami`](/cli/checkly-whoami) - Display current account information

0 commit comments

Comments
 (0)