<?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 set earliest and latest time based on current time in savedSearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650349#M224821</link>
    <description>&lt;P&gt;I am not entirely sure I understand your requirement. However, if you want a scheduled report to run every 5 minutes at 2 minutes past, 7 minutes past, 12 minutes past, etc. with a search window of 0-5,&amp;nbsp; 5-10, 10-12 etc., you would schedule the report with this cron expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2-57/5 * * * *&lt;/LI-CODE&gt;&lt;P&gt;and a timepicker setting like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=@m-7m
latest=@m-2m&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 13 Jul 2023 09:31:43 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-07-13T09:31:43Z</dc:date>
    <item>
      <title>How to set earliest and latest time based on current time in savedSearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650345#M224818</link>
      <description>&lt;P&gt;Hi Splunk Experts,&lt;BR /&gt;&lt;BR /&gt;I've a scheduled savedSearch where it runs every 5 mins, with the Schedule window of 2 minutes. Instead of searching for last 5 mins, I want to achieve something like 00 to 05 mins, 05 to 10 mins, 10 to 15 mins and so on. Is it possible to achieve this in the search, could someone please shred some lights. Thanks in advance!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval STime=now()-300, ETime=now()
| bin STime span=5m
| bin ETime span=5m&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650345#M224818</guid>
      <dc:creator>Thulasinathan_M</dc:creator>
      <dc:date>2023-07-13T08:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set earliest and latest time based on current time in savedSearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650349#M224821</link>
      <description>&lt;P&gt;I am not entirely sure I understand your requirement. However, if you want a scheduled report to run every 5 minutes at 2 minutes past, 7 minutes past, 12 minutes past, etc. with a search window of 0-5,&amp;nbsp; 5-10, 10-12 etc., you would schedule the report with this cron expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2-57/5 * * * *&lt;/LI-CODE&gt;&lt;P&gt;and a timepicker setting like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=@m-7m
latest=@m-2m&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 09:31:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650349#M224821</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-13T09:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to set earliest and latest time based on current time in savedSearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650353#M224823</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for the assistance, let me try to break-down my requirement:&lt;BR /&gt;&lt;BR /&gt;I scheduled a report to run&amp;nbsp;&lt;SPAN class=""&gt;*/&lt;/SPAN&gt;&lt;SPAN class=""&gt;5&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;* (Every 5 mins), with scheduler window of 2 mins (the scheduler can kick-off the report anytime within this 2 mins window). But irrespective of the time when it gets kicked-off I want to search the index for accurate 5 mins.&lt;BR /&gt;Lets say the scheduler started at 11:16:32.000 but I want to search in index within time of (earliest 11:10:00.000, latest 11:15:00.000).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 09:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650353#M224823</guid>
      <dc:creator>Thulasinathan_M</dc:creator>
      <dc:date>2023-07-13T09:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set earliest and latest time based on current time in savedSearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650356#M224826</link>
      <description>&lt;P&gt;Try adding this to your initial search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search&amp;gt;    [| makeresults
    | addinfo
    | eval latest=info_max_time-(info_max_time%300)
    | eval earliest=latest-300
    | fields earliest latest]&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 10:18:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650356#M224826</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-13T10:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to set earliest and latest time based on current time in savedSearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650361#M224830</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;. Working like a charm!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 10:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-earliest-and-latest-time-based-on-current-time-in/m-p/650361#M224830</guid>
      <dc:creator>Thulasinathan_M</dc:creator>
      <dc:date>2023-07-13T10:50:45Z</dc:date>
    </item>
  </channel>
</rss>

