Getting Data In

Universal forwarded schedule

mghori
New Member

I have universal forwarded configured with a powershell script . I tried using a value of zero (0) for the schedule in the inputs.conf, but the script is never run. I then used a cron schedule to run the script every 5 minutes, which works but I can't tell is the forwarded waits for the previous script instance to finish and then start a new instance, or does it start a new instance regardless of whether the previous instance has finished or not. I've noticed memory issues with this approach, where after a day or two, the powershell process consumes all available memory.

How exactly do I make sure that my script is run as soon as the previous instance finishes?

Tags (1)
0 Karma

msivill_splunk
Splunk Employee
Splunk Employee

In your script could you record the status of the script elsewhere? For example update/create a file when the script starts then update/delete the same file when the scripts finishes? The script should also check the same file to see the state of the file before the main processing happens. With this approach, you could set the script to run at smaller intervals without worrying about a previous run completing.

0 Karma

mghori
New Member

I can give that a try.
But I know if you have a scripted input, you can have an 'interval' attribute that does what I want i.e. when interval is set to 0, a new instance is started as soon as the old one finishes. But looks like for a powershell input, there is no 'interval' attribute, rather there is a 'schedule' attribute, which doesn't have a similar behavior as 'interval' for value 0 (as per the documentation )

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...