# Input jdbc scheduler

**URL:** <https://discuss.elastic.co/t/input-jdbc-scheduler/27201>\
**Category:** Logstash\
**Created:** [August 11, 2015, 4:17pm UTC](https://discuss.elastic.co/t/input-jdbc-scheduler/27201 "2015-08-11T16:17:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaellizhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michaellizhou/32/4143_2.png) [@michaellizhou](https://discuss.elastic.co/u/michaellizhou)\
**Post date:** [August 11, 2015, 4:17pm UTC](https://discuss.elastic.co/t/input-jdbc-scheduler/27201/1 "2015-08-11T16:17:03Z")

</div>

Is there a specific method to running logstash with jdbc input that has a schedule? What I have noticed for the paste 1-2 hours is that my schedule is not actually running! I have the schedule set to "\* \* \* \* \*" but it looks like it only runs when I close and open logstash. I tried 2 different methods 1 letting it run on ./bin/logstash -f text.conf and having it in the background with & Thanks.

Mike

---

<div class="post-metadata">

**Author:** ![talevy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/talevy/32/44896_2.png) [@talevy](https://discuss.elastic.co/u/talevy)\
**Post date:** [August 11, 2015, 5:59pm UTC](https://discuss.elastic.co/t/input-jdbc-scheduler/27201/2 "2015-08-11T17:59:08Z")

</div>

@michaellizhou, mind sharing your logstash config?

---

<div class="post-metadata">

**Author:** ![michaellizhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michaellizhou/32/4143_2.png) [@michaellizhou](https://discuss.elastic.co/u/michaellizhou)\
**Post date:** [August 11, 2015, 6:11pm UTC](https://discuss.elastic.co/t/input-jdbc-scheduler/27201/3 "2015-08-11T18:11:03Z")

</div>

Oh yeah could of totally put this on the github page. So I ran this as such

```
./bin/logstash -f logstash-jdbc.conf &

```

And I keep checking the last\_start time. Its the same time as previous. Never changes!

```
input {
     jdbc {
        jdbc_driver_library => "/logstash-1.5.0/ojdbc7.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@//"
        jdbc_user => ""
        jdbc_password => ""
        statement => "SELECT * from log where event_time > :sql_last_start"
        record_last_run => true
        last_run_metadata_path => "sincedbpath/.logstash_jdbc_last_run"
        schedule => "* * * * *"
        type => "log"
      }
    }
      date {
        locale => "en"
        timezone => "America/New_York"
        match => [
          "event_time" , "YYYY-MM-dd HH:mm:ss.SSS"
        ]
      }
    output {
    # stdout{ codec => rubydebug}
     elasticsearch {
        host => "localhost:9200"
      }
    }
```

---

<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, 5:32am UTC](https://discuss.elastic.co/t/input-jdbc-scheduler/27201/4 "2017-07-06T05:32:17Z")

</div>


