# Logstash Schedule every minute from 8 AM to 12 PM and from 2 PM to 6PM

**URL:** <https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032>\
**Category:** Logstash\
**Created:** [November 23, 2018, 3:10pm UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032 "2018-11-23T15:10:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali1](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ali1](https://discuss.elastic.co/u/ali1)\
**Post date:** [November 23, 2018, 3:10pm UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/1 "2018-11-23T15:10:42Z")

</div>

Hello,  
im working with logstash that get data from oracle database every minute and it works fine, but for some performance issue i have to configure logstash to execute every minute from **8 AM to 12 PM and from 2 PM to 6PM**  
do you have any idea how to acheive this ?  
this is my config in schedule property :

input{  
jdbc{  
//database info...  
schedule =\> "\*/1 \* \* \* \*"  
}  
}

Regards !

---

<div class="post-metadata">

**Author:** ![Eniqmatic](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Eniqmatic](https://discuss.elastic.co/u/Eniqmatic)\
**Post date:** [November 23, 2018, 3:16pm UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/2 "2018-11-23T15:16:55Z")

</div>

What about this:

`schedule => "* * 08-12,14-18 * * *"`

---

<div class="post-metadata">

**Author:** ![ali1](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ali1](https://discuss.elastic.co/u/ali1)\
**Post date:** [November 23, 2018, 4:14pm UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/3 "2018-11-23T16:14:12Z")

</div>

> [@Eniqmatic](#):
>
> schedule =\> "\* \* 08-12,14-18 \* \* \*"

thanks for your response i will try it and back for you.

Regards !

---

<div class="post-metadata">

**Author:** ![ali1](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ali1](https://discuss.elastic.co/u/ali1)\
**Post date:** [November 26, 2018, 8:13am UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/4 "2018-11-26T08:13:47Z")

</div>

Hello,  
unfortunately this is not working do you have any suggestions ?

regards !

---

<div class="post-metadata">

**Author:** ![Eniqmatic](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Eniqmatic](https://discuss.elastic.co/u/Eniqmatic)\
**Post date:** [November 26, 2018, 8:22am UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/5 "2018-11-26T08:22:47Z")

</div>

Sorry i made a mistake, try this:

```
schedule => "* 08-12,14-18 * * *"
```

---

<div class="post-metadata">

**Author:** ![ali1](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ali1](https://discuss.elastic.co/u/ali1)\
**Post date:** [November 26, 2018, 9:20am UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/6 "2018-11-26T09:20:54Z")

</div>

Hello,  
this is not working also 😢

---

<div class="post-metadata">

**Author:** ![Eniqmatic](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Eniqmatic](https://discuss.elastic.co/u/Eniqmatic)\
**Post date:** [November 26, 2018, 9:22am UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/7 "2018-11-26T09:22:42Z")

</div>

Do you get any errors in the logs? If so please post

---

<div class="post-metadata">

**Author:** ![ali1](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ali1](https://discuss.elastic.co/u/ali1)\
**Post date:** [November 26, 2018, 9:47am UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/8 "2018-11-26T09:47:47Z")

</div>

Hi Lewis Barclay,  
no i don't get any error just logstash gets data from my datatbase normally without respect the intervale that i set 08-12,14-18 , for example it keeps getting data from database between 12 and 14 also before 08.

regards.

---

<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:** [December 24, 2018, 9:51am UTC](https://discuss.elastic.co/t/logstash-schedule-every-minute-from-8-am-to-12-pm-and-from-2-pm-to-6pm/158032/9 "2018-12-24T09:51:22Z")

</div>

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