# Logstash.bat generates new .jar files every time it is run

**URL:** <https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747>\
**Category:** Logstash\
**Created:** [November 17, 2020, 6:46pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747 "2020-11-17T18:46:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mefhisto1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mefhisto1/32/79189_2.png) [@Mefhisto1](https://discuss.elastic.co/u/Mefhisto1)\
**Post date:** [November 17, 2020, 6:46pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/1 "2020-11-17T18:46:18Z")

</div>

Hi,

I'm running logstash every minute via a task scheduler.  
The task is to call logstash.bat with the appropriate .config file.  
This is done every minute.  
Logstash is generating a lot of files in TEMP folder every time it is run.  
Is there a way to avoid this somehow, by running logstash somehow differently?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 17, 2020, 10:33pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/2 "2020-11-17T22:33:11Z")

</div>

Welcome to our community! 😃

Why are you running it every minute?

---

<div class="post-metadata">

**Author:** ![Mefhisto1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mefhisto1/32/79189_2.png) [@Mefhisto1](https://discuss.elastic.co/u/Mefhisto1)\
**Post date:** [November 18, 2020, 3:07pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/3 "2020-11-18T15:07:43Z")

</div>

I need the data to be refreshed every minute. This is done via a windows job which first deletes the index, and the refills it again, every minute.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 19, 2020, 6:36am UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/4 "2020-11-19T06:36:31Z")

</div>

If you can explain a little more what you are trying to achieve, maybe we can figure out a better way?

---

<div class="post-metadata">

**Author:** ![Mefhisto1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mefhisto1/32/79189_2.png) [@Mefhisto1](https://discuss.elastic.co/u/Mefhisto1)\
**Post date:** [November 19, 2020, 12:12pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/5 "2020-11-19T12:12:35Z")

</div>

as simple as possible:  
client app needs to get fresh data every minute from the stored procedure.  
Right now, logstash is used to read the data from the DB and fill ES indexes, which are read from the client app.  
This has to be done every minute, and every minute logstash is generating a jar file and a dll file in the TEMP folder. Eventually, the disk fills up completely.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 19, 2020, 9:01pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/6 "2020-11-19T21:01:10Z")

</div>

Are you using the JDBC input? If so, then use [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#\_scheduling\_2](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#_scheduling_2) instead.

---

<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 17, 2020, 9:01pm UTC](https://discuss.elastic.co/t/logstash-bat-generates-new-jar-files-every-time-it-is-run/255747/7 "2020-12-17T21:01:16Z")

</div>

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