How to set the scheduler of JDBC from the INPUT plugin to every 5 seconds

Original doc :Schedule of when to periodically run statement, in Cron format
for example: "* * * * *" (execute query every minute, on the minute)

Is there any way to narrow down the period to 5 seconds?

Thanks.

1 Like

I don't think that's possible.

Logstash use rufus-scheduler in which I find out the code that can support the second-base cron.


I'll give it a shoot.

Thanks anyway.

Yes, rufus-scheduler itself supports second resolution but I see no signs that the cron syntax does.


There is a cronline.rb, which supports cron syntax.
Or am I misunderstanding you?

And how do you specify second resolution with the cron syntax?

Yes it does and it works great, currently using it:

*/10 * * * * *

6 stars is second resolution, above is a 10 second interval example.

4 Likes