# Watcher last\_checked

**URL:** <https://discuss.elastic.co/t/watcher-last-checked/250138>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [September 28, 2020, 7:26am UTC](https://discuss.elastic.co/t/watcher-last-checked/250138 "2020-09-28T07:26:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JHM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jhm/32/64657_2.png) [@JHM](https://discuss.elastic.co/u/JHM)\
**Post date:** [September 28, 2020, 7:26am UTC](https://discuss.elastic.co/t/watcher-last-checked/250138/1 "2020-09-28T07:26:36Z")

</div>

I have following code for the range of my watcher. However, I instead of the now I would like to use the last\_checked value that you get when the watcher is executed. Is there any possibility to do that?

```
                    "range": {
                        "@timestamp": {
                          "gt": "now-1h",
                          "time_zone": "Europe/Vienna"
                        }
                      }
```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 28, 2020, 11:48am UTC](https://discuss.elastic.co/t/watcher-last-checked/250138/2 "2020-09-28T11:48:40Z")

</div>

Hey,

can you explain where that `last_checked` variable is coming from? As you refer to as `the last_checked value`, you seem to use it already somewhere. Please add some context.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 26, 2020, 11:48am UTC](https://discuss.elastic.co/t/watcher-last-checked/250138/3 "2020-10-26T11:48:43Z")

</div>

Closed on October 26, 2020, 11:48am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
