<?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 Can I achieve a CRON schedule that skips a 15 minute interval? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636576#M14947</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an alert that runs every 15 minutes and checks logs for last 15 minute time span. I want the alert to not run for 1:30 am cycle.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently I am using the cron expression&amp;nbsp;*/15 0-1,2-23 * * *&lt;/P&gt;
&lt;P&gt;But this will skip all schedules between 1 -2 am [1:00, 1:15, 1:30, 1:45]&lt;/P&gt;
&lt;P&gt;Is there anyway I can only skip the alert scheduled at 1:30 am (searches time range 1:15:00 to 1:30:00 ) within one cron schedule.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know it can be done easily with 2 schedules but was wondering if this can be achieved within one CRON expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 07:43:42 GMT</pubDate>
    <dc:creator>darbritto</dc:creator>
    <dc:date>2023-03-30T07:43:42Z</dc:date>
    <item>
      <title>Can I achieve a CRON schedule that skips a 15 minute interval?</title>
      <link>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636576#M14947</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an alert that runs every 15 minutes and checks logs for last 15 minute time span. I want the alert to not run for 1:30 am cycle.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently I am using the cron expression&amp;nbsp;*/15 0-1,2-23 * * *&lt;/P&gt;
&lt;P&gt;But this will skip all schedules between 1 -2 am [1:00, 1:15, 1:30, 1:45]&lt;/P&gt;
&lt;P&gt;Is there anyway I can only skip the alert scheduled at 1:30 am (searches time range 1:15:00 to 1:30:00 ) within one cron schedule.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know it can be done easily with 2 schedules but was wondering if this can be achieved within one CRON expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 07:43:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636576#M14947</guid>
      <dc:creator>darbritto</dc:creator>
      <dc:date>2023-03-30T07:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: CRON schedule skip a 15 minute interval</title>
      <link>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636578#M14948</link>
      <description>&lt;P&gt;It isn't possible by a single cron schedule - you could modify your report so that it checks the current time and returns no results if it is 01:30&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 20:52:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636578#M14948</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-29T20:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: CRON schedule skip a 15 minute interval</title>
      <link>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636585#M14949</link>
      <description>&lt;P&gt;thanks I was able to use a logical variable to set / unset it based on time as a workaround.&amp;nbsp;&lt;/P&gt;&lt;P&gt;eval alertFlag=if( strftime(info_max_time, "%H:%M")!="01:30",1,0)&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 21:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636585#M14949</guid>
      <dc:creator>darbritto</dc:creator>
      <dc:date>2023-03-29T21:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: CRON schedule skip a 15 minute interval</title>
      <link>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636586#M14950</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/255245"&gt;@darbritto&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; is correct, either use two cron schedules, or modify your SPL query to not produce results when run at a certain time or time range.&amp;nbsp; Here's an example I've used in the past&lt;/P&gt;&lt;PRE&gt;| makeresults&lt;BR /&gt;| eval now_hour=ltrim(strftime(now(), "%H"), "0"), now_min=ltrim(strftime(now(), "%M"), "0")&lt;BR /&gt;| where now_hour!=1 OR (now_hour=1 AND (now_min &amp;gt;= 30 OR now_min &amp;lt;= 35)) ``` only produce results if the time range is outside of 01:30-01:35 ```&lt;/PRE&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 21:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636586#M14950</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-29T21:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: CRON schedule skip a 15 minute interval</title>
      <link>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636588#M14951</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since its only one time window I am trying to skip tweaking my search query was much easier. I was able not produce results for that one window with logic something similar to what you had suggested.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 21:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Can-I-achieve-a-CRON-schedule-that-skips-a-15-minute-interval/m-p/636588#M14951</guid>
      <dc:creator>darbritto</dc:creator>
      <dc:date>2023-03-29T21:33:37Z</dc:date>
    </item>
  </channel>
</rss>

