Elasticsearch Input Plugin on Timer

The only way I can think of is to use a cron job / like applications to achieve this

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