# How to configure Retention Policy for 7days and it has to execute automatically for Elasticsearch in Windows System

**URL:** <https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270>\
**Category:** Elasticsearch\
**Created:** [March 9, 2018, 1:40pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270 "2018-03-09T13:40:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvv\_nani](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@rvv\_nani](https://discuss.elastic.co/u/rvv_nani)\
**Post date:** [March 9, 2018, 1:40pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270/1 "2018-03-09T13:40:25Z")

</div>

Hi Experts,

I have few doubts on retention policy .

1. Where we need to write the retention policy code in ELK.
2. If it is a script how we have to write and where we need to execute to get it run automatically for  
every 7 days.

Note: I need the retention policy feature without using curator.

Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 9, 2018, 2:23pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270/2 "2018-03-09T14:23:03Z")

</div>

Curator is the standard way to handle index retention. Why can you not use it?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 9, 2018, 3:40pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270/3 "2018-03-09T15:40:18Z")

</div>

> [@rvv\_nani](#):
>
> I need the retention policy feature without using curator.

The only way around this is to write one yourself. Curator is, as mentioned, the current way of handling this.

What's the blocker for your organization using Curator? You don't need access to a repository, or pip. You can download RPM/DEB packages that are fully self-contained and install them in even an air-gapped environment.

---

<div class="post-metadata">

**Author:** ![rvv\_nani](https://avatars.discourse-cdn.com/v4/letter/r/54ee81/32.png) [@rvv\_nani](https://discuss.elastic.co/u/rvv_nani)\
**Post date:** [April 5, 2018, 1:45pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270/4 "2018-04-05T13:45:21Z")

</div>

I think Curator is paid version right? So they won't allow us to use.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 5, 2018, 2:12pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270/5 "2018-04-05T14:12:17Z")

</div>

Curator is completely open-source.

---

<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:** [May 3, 2018, 2:26pm UTC](https://discuss.elastic.co/t/how-to-configure-retention-policy-for-7days-and-it-has-to-execute-automatically-for-elasticsearch-in-windows-system/123270/6 "2018-05-03T14:26:32Z")

</div>

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