# How do I make my LOGSTASH pipeline of input type ELASTICSEARCH to be running in certain periods automatically?

**URL:** https://discuss.elastic.co/t/how-do-i-make-my-logstash-pipeline-of-input-type-elasticsearch-to-be-running-in-certain-periods-automatically/305799
**Category:** Logstash
**Created:** [May 27, 2022, 12:42pm UTC](https://discuss.elastic.co/t/how-do-i-make-my-logstash-pipeline-of-input-type-elasticsearch-to-be-running-in-certain-periods-automatically/305799 "2022-05-27T12:42:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_oliveira/32/106056_2.png) [@Daniel\_Oliveira](https://discuss.elastic.co/u/Daniel_Oliveira)
#### Post date: [May 27, 2022, 12:42pm UTC](https://discuss.elastic.co/t/how-do-i-make-my-logstash-pipeline-of-input-type-elasticsearch-to-be-running-in-certain-periods-automatically/305799/1 "2022-05-27T12:42:35Z")

</div>

Hello gentlemen.

I have 2 pipelines running by my LOGSTASH.

the first input FILE pipeline is running normally and processing .csv data

the second pipeline of input type Elasticsearch it runs only the first time, then it has finished status.

How do I make this second pipeline of the input type Elasticsearch run in certain periods automatically by LOGSTASH?

```auto
input {
  elasticsearch {

                    hosts => ["xxx.xxx.xxx.xxx"]
                    index => "dados-csv"
                    query => '{
                            "_source": ["Box or Label","Scan Time","Uid Value"], 
                            "query": {
                                "range": {
                                    "@timestamp": {
                                        "gte": "now-22h/h",
                                        "lt": "now/d"
                                    }
                                }
                            }
                        }'
                    user => " *****"
                    password => "12345678"
                    ssl => false
                    size => 1000
                    scroll => "5m"
                    docinfo => true
                }
}
filter {
    
}
output {
    elasticsearch {
       
                  }  
}

```

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [May 27, 2022, 12:56pm UTC](https://discuss.elastic.co/t/how-do-i-make-my-logstash-pipeline-of-input-type-elasticsearch-to-be-running-in-certain-periods-automatically/305799/2 "2022-05-27T12:56:45Z")

</div>

you add this line this will run on top of every hour. basically it follows crontab format.  
min hr day\_of\_month month day\_of\_week

schedule =\> "00 \* \* \* \*"

---

<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: [June 24, 2022, 12:57pm UTC](https://discuss.elastic.co/t/how-do-i-make-my-logstash-pipeline-of-input-type-elasticsearch-to-be-running-in-certain-periods-automatically/305799/3 "2022-06-24T12:57:14Z")

</div>

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