# How can i schedule logstash every second for file input plugin?

**URL:** <https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605>\
**Category:** Logstash\
**Created:** [January 27, 2020, 6:40am UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605 "2020-01-27T06:40:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunawan\_Kevin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gunawan_kevin/32/52040_2.png) [@Gunawan\_Kevin](https://discuss.elastic.co/u/Gunawan_Kevin)\
**Post date:** [January 27, 2020, 6:40am UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605/1 "2020-01-27T06:40:52Z")

</div>

Hi All

I want to make schedule in file input like jdbc input and i already used start\_interval and discover\_interval in my file input but still didn't work.

is there another way for make file input schedule in every 5 second

Thank you  
Regards  
Kevin

---

<div class="post-metadata">

**Author:** ![tamara](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamara/32/47095_2.png) [@tamara](https://discuss.elastic.co/u/tamara)\
**Post date:** [January 28, 2020, 2:24pm UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605/2 "2020-01-28T14:24:39Z")

</div>

You need to configure the stat\_interval ("How often (in seconds) we stat files to see if they have been modified"):  
[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-stat\_interval](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-stat_interval)

---

<div class="post-metadata">

**Author:** ![Gunawan\_Kevin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gunawan_kevin/32/52040_2.png) [@Gunawan\_Kevin](https://discuss.elastic.co/u/Gunawan_Kevin)\
**Post date:** [January 29, 2020, 2:04am UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605/3 "2020-01-29T02:04:38Z")

</div>

i already config the stat\_interval and discover\_interval but didn't work  
maybe yon can see my configure  
input {  
file {  
path =\> "D:/elasticsearch/logstash-7.4.2/bin/myfile.csv"  
start\_position =\> "beginning"  
stat\_interval =\> "1 sec"  
discover\_interval =\> "1 sec"  
id =\> "identity"  
}  
}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 29, 2020, 2:49pm UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605/4 "2020-01-29T14:49:30Z")

</div>

You may be hitting [this](https://github.com/logstash-plugins/logstash-input-file/issues/231) issue, where FriendlyDurations misinterprets seconds as days. Does changing it to 1000 msec help?

---

<div class="post-metadata">

**Author:** ![Gunawan\_Kevin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gunawan_kevin/32/52040_2.png) [@Gunawan\_Kevin](https://discuss.elastic.co/u/Gunawan_Kevin)\
**Post date:** [January 30, 2020, 2:13am UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605/5 "2020-01-30T02:13:02Z")

</div>

thank you badger for your help but still didn't work  
is discover\_interval must multiply 15 from stat\_interval  
and my discover\_interval didn't work if i used " 15 sec" did you have any idea about this  
thank you

---

<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:** [February 27, 2020, 2:13am UTC](https://discuss.elastic.co/t/how-can-i-schedule-logstash-every-second-for-file-input-plugin/216605/6 "2020-02-27T02:13:10Z")

</div>

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