Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run the schedule every five minutes in Logstash 5.0?

I'm having a jdbc connection within my input in logstash where as I'm trying to execute the query according to the schedule property. I went through jdbc and rufus-scheduler, but still pretty unclear of what those five stars(*) represent individually.

As per my knowledge, the stars from left to right (* * * * *):

  1. minute
  2. hour
  3. from (month)
  4. to (month)
  5. day

So if it's a scenario as such (* * * * *), it represents that the scheduler would run every minute. Hence if I'm to run it every five minutes, how the scheduler should look like? Something like (5 * * * *)?

Have I assumed it right? Or correct me if I'm wrong please.

like image 899
Kulasangar Avatar asked Dec 10 '22 14:12

Kulasangar


1 Answers

5 * * * * will run it only once per hour, five minutes after the hour, i.e. at HH:05

If you want to run it every five minutes of every hour, you need to write the schedule like this:

*/5 * * * *
like image 169
Val Avatar answered Jan 28 '23 07:01

Val