<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PowerShell Modular Input Schedule Parameter in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375735#M68049</link>
    <description>&lt;P&gt;Do you have any logs in your systems that show ExecProcessor scheduling powershell inputs?  I  only see logs for the input if the cron is invalid, otherwise it doesn't mention that it has scheduled anything.&lt;/P&gt;</description>
    <pubDate>Sat, 05 May 2018 20:14:33 GMT</pubDate>
    <dc:creator>Kendo213</dc:creator>
    <dc:date>2018-05-05T20:14:33Z</dc:date>
    <item>
      <title>PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375728#M68042</link>
      <description>&lt;P&gt;7.0.0.2 Forwarder, with the following schedule specified in the inputs.conf for a PowerShell input: schedule = &lt;CODE&gt;*/5 * * * *&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This resulted in the following run times in the last 24 hours:&lt;/P&gt;

&lt;P&gt;4:15 AM, 4:20 AM, 5:15 AM, 6:15 AM,6:20 Am, 7:15 AM, 8:20 AM.&lt;/P&gt;

&lt;P&gt;I have opened a ticket, however I wanted to see if anyone could decipher why that happened with the cron expression I'm using.&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 13:44:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375728#M68042</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-05T13:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375729#M68043</link>
      <description>&lt;P&gt;I'm surprised that the input is running at all. Common inputs have 5 positions.&lt;BR /&gt;
Powershell inputs however use the Quartz Syntax, so they have 6 positions:&lt;/P&gt;

&lt;P&gt;Check this manual for details:&lt;BR /&gt;
&lt;A href="https://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/crontriggers.html"&gt;https://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/crontriggers.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt; If you change your crown format, it should work properly. &amp;lt;- &lt;STRONG&gt;Only true for the Powershell add-on.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 14:16:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375729#M68043</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-05T14:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375730#M68044</link>
      <description>&lt;P&gt;There seems to be confusion about what the Powershell inputs require from a schedule perspective.  The quartz requirement seems to stem from the old Add-on for Powershell that is out on Splunk base.  &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.cronmaker.com/"&gt;http://www.cronmaker.com/&lt;/A&gt; creates quartz based expressions, however if you use those expressions, splunkd.log will report it as invalid.  For example, they say to use &lt;CODE&gt;0 0/5 * * * ?&lt;/CODE&gt; to trigger every 5 minutes.  That results in the error below when restarting the forwarder:&lt;/P&gt;

&lt;P&gt;05-05-2018 09:32:25.199 -0500 ERROR ExecProcessor - message from ""C:\Program Files\SplunkUniversalForwarder\bin\splunk-powershell.exe"" splunk-powershell - Powershell::InitPowershell: Stanza checkdnsext. Invalid cron schedule: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;0/5 * * * *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, please refer back to my original post.  Splunk forums was stripping out a part of my cron schedule.  &lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 14:34:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375730#M68044</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-05T14:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375731#M68045</link>
      <description>&lt;P&gt;It seems to strip out the 6th position in the Cron for a [powershell://test] stanza.&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 14:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375731#M68045</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-05T14:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375732#M68046</link>
      <description>&lt;P&gt;And -- just to add -- perhaps I'm just doing something completely wrong.  Why else would it be stripping the 6th position from the cron and calling it invalid?&lt;/P&gt;

&lt;P&gt;I've created an app in /etc/apps/specialapp with a bin folder, and a local folder.&lt;/P&gt;

&lt;P&gt;The bin obviously contains the script.  The local folder contains inputs.conf which contains the following:&lt;/P&gt;

&lt;P&gt;[powershell://checkdnsext]&lt;BR /&gt;
script = . "$SplunkHome\etc\apps\specialapp\bin\checkdnsext.ps1"&lt;BR /&gt;
schedule = 0 0/5 * * * ?&lt;BR /&gt;
sourcetype = ourcompany:powershell&lt;BR /&gt;
source = Powershell&lt;BR /&gt;
index = test&lt;BR /&gt;
disabled = false&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 14:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375732#M68046</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-05T14:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375733#M68047</link>
      <description>&lt;P&gt;Hey, you're right, I missed that part.&lt;BR /&gt;
I've to admit I don't know why there's a Powershell add-on when Powershell support is already built-in.&lt;BR /&gt;
The built-in seems to use the 5 positions, so, yeah, yours should work (and also, it seems to work, if not reliable.&lt;BR /&gt;
You could try setting &lt;CODE&gt;schedule = 300&lt;/CODE&gt; to run it every 300 seconds, also the execution time wouldn't be aligned to :*5 and :*0. Also, you could try to search &lt;CODE&gt;index=_internal host=yourhost ExecProcessor&lt;/CODE&gt; to see when the ExecProcesor schedules your input and for what time/schedule - maybe you can see any strange behavior in those logs.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375733#M68047</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2020-09-29T19:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375734#M68048</link>
      <description>&lt;P&gt;Yeah this is all very confusing, and the documentation you find isn't clear, and contradictory in some spots.  I'll give those a shot, I didn't know about that _internal search.  Thanks for the responses&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 15:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375734#M68048</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-05T15:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell Modular Input Schedule Parameter</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375735#M68049</link>
      <description>&lt;P&gt;Do you have any logs in your systems that show ExecProcessor scheduling powershell inputs?  I  only see logs for the input if the cron is invalid, otherwise it doesn't mention that it has scheduled anything.&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 20:14:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/PowerShell-Modular-Input-Schedule-Parameter/m-p/375735#M68049</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-05T20:14:33Z</dc:date>
    </item>
  </channel>
</rss>

