﻿---
title: stack es watcher execute-watch cli command
description: Run a watch. Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4089/reference/elastic-cli/cli/stack/es/watcher/execute-watch
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack es watcher execute-watch cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack es watcher execute-watch [options]
```

Run a watch.
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--debug">
    Defines whether the watch runs in debug mode.
  </definition>
  <definition term="--action-modes string">
    Determines how to handle the watch actions as part of the watch execution.
  </definition>
  <definition term="--alternative-input string">
    When present, the watch uses this object as a payload instead of executing its own input.
  </definition>
  <definition term="--ignore-condition">
    When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter.
  </definition>
  <definition term="--record-execution">
    When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time.
    In addition, the status of the watch is updated, possibly throttling subsequent runs.
    This can also be specified as an HTTP parameter.
  </definition>
  <definition term="--simulated-actions string">
  </definition>
  <definition term="--trigger-data string">
    This structure is parsed as the data of the trigger event that will be used during the watch execution.
  </definition>
  <definition term="--watch string">
    When present, this watch is used instead of the one specified in the request.
    This watch is not persisted to the index and `record_execution` cannot be set.
  </definition>
  <definition term="--id string">
    The watch identifier.
  </definition>
  <definition term="--error-trace">
    When set to `true` Elasticsearch will include the full stack trace of errors
    when they occur.
  </definition>
  <definition term="--filter-path string">
    Comma-separated list of filters in dot notation which reduce the response
    returned by Elasticsearch.
    **Repeatable:** pass `--filter-path` multiple times to supply more than one value
  </definition>
  <definition term="--human">
    When set to `true` will return statistics in a format suitable for humans.
    For example `"exists_time": "1h"` for humans and
    `"exists_time_in_millis": 3600000` for computers. When disabled the human
    readable values will be omitted. This makes sense for responses being consumed
    only by machines.
  </definition>
  <definition term="--pretty">
    If set to `true` the returned JSON will be "pretty-formatted". Only use
    this option for debugging only.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>