# Cron job for CSV filter

**URL:** <https://discuss.elastic.co/t/cron-job-for-csv-filter/253744>\
**Category:** Logstash\
**Created:** [October 29, 2020, 7:51pm UTC](https://discuss.elastic.co/t/cron-job-for-csv-filter/253744 "2020-10-29T19:51:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)\
**Post date:** [October 29, 2020, 7:51pm UTC](https://discuss.elastic.co/t/cron-job-for-csv-filter/253744/1 "2020-10-29T19:51:09Z")

</div>

Hi All,

I am using logstash to upload data into Elastic, we have been using csv filter to upload the data, i need to run this csv file on a every 15 minute frequency.

csv filter doesnot allow "schedule" , how do i set up a cron to be run every 15 mins in csv filter plugin.  
I tried **start\_interval =60** , this is working for first time update, its not updating on a regular basis.

PLease advice, do we have such option to run csv filter in schedule?

Thanks  
Gautham

---

<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:** [October 29, 2020, 8:17pm UTC](https://discuss.elastic.co/t/cron-job-for-csv-filter/253744/2 "2020-10-29T20:17:03Z")

</div>

You cannot schedule a filter. You may be able to schedule an input. How are you reading the file?

---

<div class="post-metadata">

**Author:** ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)\
**Post date:** [October 30, 2020, 3:43am UTC](https://discuss.elastic.co/t/cron-job-for-csv-filter/253744/3 "2020-10-30T03:43:36Z")

</div>

@Badger Here is my config file,

```
input {
  file {
    path => "/etc/logstash/http_poller/python/cmdb.csv"
    start_position => "beginning"
   sincedb_path => "/dev/null"
   stat_interval => 60
  }
}
filter {
  csv {
      separator => ","
      columns => ["support_group","affectedApplication","[result][inc_business_service][display_value]","it_application_owner","NodeID","[data][results][Caption]","Business_Criticality","Type"]
  }
}
output {
  elasticsearch {
    hosts => ["1.3.5.2:9200"]
    user => " ****"
    password => " *******"
    index => "performance"
  }
#stdout { codec => rubydebug }
}

```

Thanks  
Gautham

---

<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:** [October 30, 2020, 2:41pm UTC](https://discuss.elastic.co/t/cron-job-for-csv-filter/253744/4 "2020-10-30T14:41:04Z")

</div>

A file input does not support a schedule. If you want to read the file every 15 minutes you might be better off using an exec input to cat the file.

---

<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:** [November 27, 2020, 2:41pm UTC](https://discuss.elastic.co/t/cron-job-for-csv-filter/253744/5 "2020-11-27T14:41:36Z")

</div>

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