﻿---
title: stack es watcher execute-watch cli command
description: Run a watch. 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/406/cli/stack/es/watcher/execute-watch
---

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

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

Run a watch.

## Options

<definitions>
  <definition term="--id string">
    The watch identifier.
  </definition>
  <definition term="--[no-]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="--[no-]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="--[no-]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>
</definitions>


## stack Options

<definitions>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="-V --[no-]version">
    Print the Elastic CLI version
  </definition>
  <definition term="--config-file string">
    path to a config file (default: ~/.elasticrc.yml)
  </definition>
  <definition term="--use-context string">
    override the active context from the config file
  </definition>
  <definition term="--command-profile string">
    restrict available commands to a deployment profile (serverless, stack, default)
  </definition>
  <definition term="--[no-]json">
    output as JSON
  </definition>
  <definition term="--output-fields string">
    comma-separated list of fields to include in output (dot-notation supported)
  </definition>
  <definition term="--output-template string">
    Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
  </definition>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>