# Logstash elasticsearch input re-running query infinately

**URL:** https://discuss.elastic.co/t/logstash-elasticsearch-input-re-running-query-infinately/150038
**Category:** Logstash
**Created:** [September 26, 2018, 3:00pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-re-running-query-infinately/150038 "2018-09-26T15:00:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JeremyinNC](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeremyinnc/32/44868_2.png) [@JeremyinNC](https://discuss.elastic.co/u/JeremyinNC)
#### Post date: [September 26, 2018, 3:00pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-re-running-query-infinately/150038/1 "2018-09-26T15:00:39Z")

</div>

Config below, I expect this to run once at 2:55 PM but it's never stopping. I can see it's getting the right data but once it completes the query it just starts it back up again. This is using logstash 5.6.12. Any suggestions?

```auto
input {
  elasticsearch {
    hosts => "es-int.prod.company.com"
    index => "logstash-event-*"
    schedule => "55 14 * * *" 
    query => '{
    "query": {
        "bool": {
            "must": [
                {
                    "match": {
                        "siteId": 141484
                    }
                }
            ],
            "filter": [
                {
                    "range": {
                        "timestamp": {
                            "gte": "2018-08-01T00:00:00.000Z",
                            "lte": "2018-08-31T23:59:59.999Z"
                        }
                    }
                }
            ]
        }
    }
}'
  }
}

```

---

<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 24, 2018, 3:10pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-re-running-query-infinately/150038/2 "2018-10-24T15:10:48Z")

</div>

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