Without going into a lot of other settings that you need to apply you can run a rudimentary inputs
Create a splunk app with a structure like this
interval = 30
This will run your script every 30 seconds. You can use seconds there or a cron expression.