# How can Listen to Index refresh?

**URL:** <https://discuss.elastic.co/t/how-can-listen-to-index-refresh/24262>\
**Category:** Elasticsearch\
**Created:** [June 24, 2015, 12:57pm UTC](https://discuss.elastic.co/t/how-can-listen-to-index-refresh/24262 "2015-06-24T12:57:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESUser10](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@ESUser10](https://discuss.elastic.co/u/ESUser10)\
**Post date:** [June 24, 2015, 12:57pm UTC](https://discuss.elastic.co/t/how-can-listen-to-index-refresh/24262/1 "2015-06-24T12:57:38Z")

</div>

I will write a Plugin that scan a directory in periode. The Periode to scan are in the settings of the Index ("index.refresh\_interval":"1h").  
My Problem is, how can Listen the Index? It means a Service or Method must call every 1 hour. It give it a Listerer for it?

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 24, 2015, 2:57pm UTC](https://discuss.elastic.co/t/how-can-listen-to-index-refresh/24262/2 "2015-06-24T14:57:39Z")

</div>

Your plugin will be in Java, so you can use any Java timers you see fit.  
When you instantiate the plugin, you will get the settings, so you can  
instantiate a timer at that point.

Cheers,

Ivan

---

<div class="post-metadata">

**Author:** ![ESUser10](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@ESUser10](https://discuss.elastic.co/u/ESUser10)\
**Post date:** [June 29, 2015, 1:06pm UTC](https://discuss.elastic.co/t/how-can-listen-to-index-refresh/24262/3 "2015-06-29T13:06:21Z")

</div>

How can read the Index Settings in the Plugin ? Can I do this with the BaseRestHandler ?  
Thanks

---

<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:** [July 6, 2017, 12:04am UTC](https://discuss.elastic.co/t/how-can-listen-to-index-refresh/24262/4 "2017-07-06T00:04:48Z")

</div>

Closed on July 6, 2017, 12:04am UTC


