# Data is not update using schedule

**URL:** <https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776>\
**Category:** Logstash\
**Created:** [October 30, 2017, 3:37pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776 "2017-10-30T15:37:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumit\_Gupta1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sumit_gupta1/32/22861_2.png) [@Sumit\_Gupta1](https://discuss.elastic.co/u/Sumit_Gupta1)\
**Post date:** [October 30, 2017, 3:37pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/1 "2017-10-30T15:37:14Z")

</div>

I'm using Following command. This is not updating Data as schedule .

It is my Script:

```auto
input {
    jdbc {
        jdbc_driver_library => "/app/logstash-5.6.2/lib/ojdbc7.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521/apextst"
        jdbc_user => " *****"
        jdbc_password => " ****"
        jdbc_fetch_size => 3000
        schedule => "* * * * *"
        statement => "select * from dba_data_files"
       }
}
output {
    stdout { codec => rubydebug }
        elasticsearch {
                hosts => ["localhost:9200"]
                index => "logstash-databases-info"
                document_type => "mytype1"
                document_id => "%{file_id}"
        }
}

```

Can you please check?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 30, 2017, 4:45pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/2 "2017-10-30T16:45:05Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

I edited your post.

I moved your question to #logstash

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 30, 2017, 8:22pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/3 "2017-10-30T20:22:01Z")

</div>

> This is not updating Data as schedule .

So what does happen? What does your stdout output produce?

---

<div class="post-metadata">

**Author:** ![Sumit\_Gupta1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sumit_gupta1/32/22861_2.png) [@Sumit\_Gupta1](https://discuss.elastic.co/u/Sumit_Gupta1)\
**Post date:** [October 31, 2017, 12:10pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/4 "2017-10-31T12:10:38Z")

</div>

This is not update data as schedule. This giving old data. As scheduled this should be run on the interval one second.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 31, 2017, 12:51pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/5 "2017-10-31T12:51:42Z")

</div>

> As scheduled this should be run on the interval one second.

No, "\* \* \* \* \*" means every minute.

---

<div class="post-metadata">

**Author:** ![Sumit\_Gupta1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sumit_gupta1/32/22861_2.png) [@Sumit\_Gupta1](https://discuss.elastic.co/u/Sumit_Gupta1)\
**Post date:** [October 31, 2017, 12:59pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/6 "2017-10-31T12:59:06Z")

</div>

Ok, But this is not updated in every minute.

Should be delete any last\_run\_metadata\_path file?

I'm not finding any such type file.

---

<div class="post-metadata">

**Author:** ![Sumit\_Gupta1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sumit_gupta1/32/22861_2.png) [@Sumit\_Gupta1](https://discuss.elastic.co/u/Sumit_Gupta1)\
**Post date:** [October 31, 2017, 1:40pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/7 "2017-10-31T13:40:33Z")

</div>

Ok, This is running in the interval using following script

./logstash -f /app/logstash-5.6.2/logstash-ora1.conf

If i skip by CTR+C, then schedule is stopping. How can i run this script regular interval.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 31, 2017, 2:09pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/8 "2017-10-31T14:09:56Z")

</div>

> Ok, But this is not updated in every minute.

What does your stdout output produce?

> Should be delete any last\_run\_metadata\_path file?

Yes, or set the jdbc input's `clean_run` option.

---

<div class="post-metadata">

**Author:** ![Sumit\_Gupta1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sumit_gupta1/32/22861_2.png) [@Sumit\_Gupta1](https://discuss.elastic.co/u/Sumit_Gupta1)\
**Post date:** [October 31, 2017, 2:11pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/9 "2017-10-31T14:11:20Z")

</div>

Thanks for reply but i'm not finding last\_run\_metadata\_path file?

Can you help me how to find this file?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 31, 2017, 2:21pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/10 "2017-10-31T14:21:15Z")

</div>

The docs indicate that the last run data is stored in $HOME/.logstash\_jdbc\_last\_run.

---

<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 28, 2017, 2:21pm UTC](https://discuss.elastic.co/t/data-is-not-update-using-schedule/105776/11 "2017-11-28T14:21:42Z")

</div>

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