# Elasticsearch schedule not working

**URL:** <https://discuss.elastic.co/t/elasticsearch-schedule-not-working/289088>\
**Category:** Logstash\
**Created:** [November 12, 2021, 4:36pm UTC](https://discuss.elastic.co/t/elasticsearch-schedule-not-working/289088 "2021-11-12T16:36:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANDRA\_ROY\_ARICATT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandra_roy_aricatt/32/96765_2.png) [@SANDRA\_ROY\_ARICATT](https://discuss.elastic.co/u/SANDRA_ROY_ARICATT)\
**Post date:** [November 12, 2021, 4:36pm UTC](https://discuss.elastic.co/t/elasticsearch-schedule-not-working/289088/1 "2021-11-12T16:36:50Z")

</div>

Even when I provided the schedule option, logstash is getting records from MySQL every second. I wanted logstash to poll MySQL only in every 30 minutes.

logstash db.conf file

#file : db.conf  
input{

```
jdbc {

	#connection string to database db
	jdbc_connection_string => "jdbc:mysql://localhost:3306/db"
	#user we wish to execute our statement as
	jdbc_user => "root"
	#user pw
	jdbc_password => "*"
	schedule => "0 0/30 * * * ?"
	#the path to our downloaded jdbc driver
	#jdbc_driver_library => "logstash-core/lib/jars/mysql-connector-java-8.0.27/mysql-connector-java-8.0.27.jar"
	#the name of the driver class for mysql
	#jdbc_driver_class => "com.mysql.jdbc.Driver"
	#query
	statement => "SELECT * from Menu"

}

```

I would appreciate for any suggestions.

Edit: I was editing a db.conf file which was in a different location. It works fine now

---

<div class="post-metadata">

**Author:** ![ahmed\_charafouddine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_charafouddine/32/45129_2.png) [@ahmed\_charafouddine](https://discuss.elastic.co/u/ahmed_charafouddine)\
**Post date:** [November 12, 2021, 4:57pm UTC](https://discuss.elastic.co/t/elasticsearch-schedule-not-working/289088/2 "2021-11-12T16:57:57Z")

</div>

I think it should be something like this:

```auto
schedule => "*/30 * * * *"

```

---

<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:** [December 10, 2021, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-schedule-not-working/289088/3 "2021-12-10T16:58:26Z")

</div>

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