<?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: How to Schedule a search for every 30 seconds. in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122071#M2727</link>
    <description>&lt;P&gt;You cannot directly but you can run a CLI-based search on the search head so you can setup a cron job with 2 searches to run every second like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; * * * * * /my30SecondScript
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then inside &lt;CODE&gt;my30SecondScript&lt;/CODE&gt; do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;exec '/opt/splunk/bin/splunk search "my search string"'
sleep 30
exec '/opt/splunk/bin/splunk search "my search string"'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 25 May 2015 14:06:12 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-05-25T14:06:12Z</dc:date>
    <item>
      <title>How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122068#M2724</link>
      <description>&lt;P&gt;I need to schedule a saved search for every 30 seconds, but I find the Basic one minute as the minimum schedule, which is also same in crons, please suggest is any other way to schedule for seconds.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 11:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122068#M2724</guid>
      <dc:creator>nkchaitanya</dc:creator>
      <dc:date>2015-05-25T11:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122069#M2725</link>
      <description>&lt;P&gt;AFAIK, &lt;CODE&gt;cron&lt;/CODE&gt; does not go down to sub-minute resolutions/granularity.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 11:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122069#M2725</guid>
      <dc:creator>miteshvohra</dc:creator>
      <dc:date>2015-05-25T11:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122070#M2726</link>
      <description>&lt;P&gt;Thanks @miteshvohra,&lt;BR /&gt;
Is there any way to schedule in seconds.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 11:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122070#M2726</guid>
      <dc:creator>nkchaitanya</dc:creator>
      <dc:date>2015-05-25T11:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122071#M2727</link>
      <description>&lt;P&gt;You cannot directly but you can run a CLI-based search on the search head so you can setup a cron job with 2 searches to run every second like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; * * * * * /my30SecondScript
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then inside &lt;CODE&gt;my30SecondScript&lt;/CODE&gt; do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;exec '/opt/splunk/bin/splunk search "my search string"'
sleep 30
exec '/opt/splunk/bin/splunk search "my search string"'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 May 2015 14:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122071#M2727</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-25T14:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122072#M2728</link>
      <description>&lt;P&gt;Is it possible to make a "sleep 30" custom splunk command? Is it possible to make 2 copies of the same saved search, and then put a sleep 30 in one of them?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 04:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122072#M2728</guid>
      <dc:creator>hylam</dc:creator>
      <dc:date>2015-12-14T04:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122073#M2729</link>
      <description>&lt;P&gt;Splunk has a facility to create your own splunk commands but I have never done so so I cannot speak to that.  You could to the latter which is the same as my solution but removing the first line of the script code that I wrote.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 17:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122073#M2729</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-14T17:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122074#M2730</link>
      <description>&lt;P&gt;Where do you put the my30SecondScript? &lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 00:42:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122074#M2730</guid>
      <dc:creator>hylam</dc:creator>
      <dc:date>2015-12-15T00:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122075#M2731</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/script"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/script&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 02:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122075#M2731</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-15T02:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122076#M2732</link>
      <description>&lt;P&gt;Can I use the splunk job scheduler as a "highly available cron" to run arbitrary scripts? Splunk's job scheduler picks 1 of the search heads in an SHC to run a scheduled search. Splunk's job scheduler also prevents successive long running jobs to overlap.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 02:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122076#M2732</guid>
      <dc:creator>hylam</dc:creator>
      <dc:date>2015-12-15T02:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122077#M2733</link>
      <description>&lt;P&gt;Exactly the plan.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 02:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122077#M2733</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-15T02:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Schedule a search for every 30 seconds.</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122078#M2734</link>
      <description>&lt;P&gt;To have perfect run intervals, a user can append ampersand (&amp;amp;) before every such sleep command.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 15:15:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Schedule-a-search-for-every-30-seconds/m-p/122078#M2734</guid>
      <dc:creator>znaesh</dc:creator>
      <dc:date>2018-09-27T15:15:36Z</dc:date>
    </item>
  </channel>
</rss>

