# Does the jdbc\_static loader run once upon logstash start or restart no matter the scheduler?

**URL:** <https://discuss.elastic.co/t/does-the-jdbc-static-loader-run-once-upon-logstash-start-or-restart-no-matter-the-scheduler/246681>\
**Category:** Logstash\
**Created:** [August 27, 2020, 7:37pm UTC](https://discuss.elastic.co/t/does-the-jdbc-static-loader-run-once-upon-logstash-start-or-restart-no-matter-the-scheduler/246681 "2020-08-27T19:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chapmantrain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chapmantrain/32/22646_2.png) [@chapmantrain](https://discuss.elastic.co/u/chapmantrain)\
**Post date:** [August 27, 2020, 7:37pm UTC](https://discuss.elastic.co/t/does-the-jdbc-static-loader-run-once-upon-logstash-start-or-restart-no-matter-the-scheduler/246681/1 "2020-08-27T19:37:51Z")

</div>

When you start up or restart logstash with a jdbc\_static filter, does the loader automatically run once and then pick up the scheduler?

In other words if I have the scheduler set to run once a day at midnight, and I start logstash up at, say, 11:00. Will the loader run then to retrieve the table data and then wait for midnight for the next run.

---

<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:** [August 27, 2020, 8:08pm UTC](https://discuss.elastic.co/t/does-the-jdbc-static-loader-run-once-upon-logstash-start-or-restart-no-matter-the-scheduler/246681/2 "2020-08-27T20:08:03Z")

</div>

My reading of the [code](https://github.com/logstash-plugins/logstash-filter-jdbc_static/blob/2e37229d01e3da0cf7039184cec10bc4ccc54905/lib/logstash/filters/jdbc_static.rb#L192) is that it loads at startup and thereafter according to the schedule.

---

<div class="post-metadata">

**Author:** ![chapmantrain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chapmantrain/32/22646_2.png) [@chapmantrain](https://discuss.elastic.co/u/chapmantrain)\
**Post date:** [August 27, 2020, 8:34pm UTC](https://discuss.elastic.co/t/does-the-jdbc-static-loader-run-once-upon-logstash-start-or-restart-no-matter-the-scheduler/246681/3 "2020-08-27T20:34:59Z")

</div>

Thanks for the quick response Badger. As soon as I can get the test system stable, I'll give that filter a shot.

---

<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:** [September 24, 2020, 8:35pm UTC](https://discuss.elastic.co/t/does-the-jdbc-static-loader-run-once-upon-logstash-start-or-restart-no-matter-the-scheduler/246681/4 "2020-09-24T20:35:00Z")

</div>

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