<?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 Splunk Alert With Cron Triggering when it shouldn't in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400081#M7038</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Recently we got Splunk upgraded to version 7.2.5.1 and one of my alerts have been triggering not following it's cron schedule expression. I wrote this cron expression for an alert which only supposed to run at 8am the first Monday of every month:&lt;/P&gt;

&lt;P&gt;0 8 1-7 * 1&lt;/P&gt;

&lt;P&gt;Just to break this down:&lt;/P&gt;

&lt;P&gt;0: Minute&lt;BR /&gt;
8: Hour&lt;BR /&gt;
1 - 7: Day of the month&lt;BR /&gt;
*: Month&lt;BR /&gt;
1: Day of the week  (Monday)&lt;/P&gt;

&lt;P&gt;The alert was behaving as expected before the upgrade. It have triggered on Tuesday 04/02 at 8pm Est and on Thursday 04/04 at 8pm. What may be the issue? Any help is appreciated. Thanks for your time.&lt;/P&gt;

&lt;P&gt;Luis Espinoza&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2019 13:50:22 GMT</pubDate>
    <dc:creator>lespinoza212</dc:creator>
    <dc:date>2019-04-05T13:50:22Z</dc:date>
    <item>
      <title>Splunk Alert With Cron Triggering when it shouldn't</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400081#M7038</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Recently we got Splunk upgraded to version 7.2.5.1 and one of my alerts have been triggering not following it's cron schedule expression. I wrote this cron expression for an alert which only supposed to run at 8am the first Monday of every month:&lt;/P&gt;

&lt;P&gt;0 8 1-7 * 1&lt;/P&gt;

&lt;P&gt;Just to break this down:&lt;/P&gt;

&lt;P&gt;0: Minute&lt;BR /&gt;
8: Hour&lt;BR /&gt;
1 - 7: Day of the month&lt;BR /&gt;
*: Month&lt;BR /&gt;
1: Day of the week  (Monday)&lt;/P&gt;

&lt;P&gt;The alert was behaving as expected before the upgrade. It have triggered on Tuesday 04/02 at 8pm Est and on Thursday 04/04 at 8pm. What may be the issue? Any help is appreciated. Thanks for your time.&lt;/P&gt;

&lt;P&gt;Luis Espinoza&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400081#M7038</guid>
      <dc:creator>lespinoza212</dc:creator>
      <dc:date>2019-04-05T13:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert With Cron Triggering when it shouldn't</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400082#M7039</link>
      <description>&lt;P&gt;@lespinoza212,&lt;/P&gt;

&lt;P&gt;It does not seem to be a splunk alert issue but crontab works that way&lt;/P&gt;

&lt;P&gt;Below is from crontab manual &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Note: The day of a command's execution can be specified by two fields - day of month, and day of week. 
If both fields are restricted (ie, aren't *), the command will be run when either field matches the current time. 
For example,
"30 4 1,15 * 5" would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So in your case, it runs every month from 1-7 and also on every Monday&lt;/P&gt;

&lt;P&gt;You might need to include the logic in your search &lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 14:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400082#M7039</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-04-05T14:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert With Cron Triggering when it shouldn't</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400083#M7040</link>
      <description>&lt;P&gt;Hello @renjith.nair ,&lt;BR /&gt;
Thanks for the quick response. I've read that part of the crontab manual, but if it is as it says, it would have triggered on Wednesday (04/03) as well, which it didn't. My alert triggers if my  search string results count is equal to 0.&lt;/P&gt;

&lt;P&gt;These logs are only expected on the first monday of every month. &lt;/P&gt;

&lt;P&gt;I remembered that when I created the alert some months ago, I took as reference this post: &lt;A href="https://answers.splunk.com/answers/495212/cron-expression-for-first-two-mondays-of-every-mon.html"&gt;https://answers.splunk.com/answers/495212/cron-expression-for-first-two-mondays-of-every-mon.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 15:43:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400083#M7040</guid>
      <dc:creator>lespinoza212</dc:creator>
      <dc:date>2019-04-05T15:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert With Cron Triggering when it shouldn't</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400084#M7041</link>
      <description>&lt;P&gt;Check you cron configuration on crontab.guru&lt;/P&gt;

&lt;P&gt;&lt;A href="https://crontab.guru/#0_8_1-7_*_1,Check"&gt;https://crontab.guru/#0_8_1-7_*_1,Check&lt;/A&gt; your crontab logic on crontab.guru web page:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://crontab.guru/#0_8_1-7_*_1"&gt;https://crontab.guru/#0_8_1-7_*_1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 22:10:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400084#M7041</guid>
      <dc:creator>oztraik9</dc:creator>
      <dc:date>2019-07-19T22:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Alert With Cron Triggering when it shouldn't</title>
      <link>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400085#M7042</link>
      <description>&lt;P&gt;Check your cron configuration on crontab.guru site:&lt;BR /&gt;
&lt;A href="https://crontab.guru/#0_8_1-7_*_1"&gt;https://crontab.guru/#0_8_1-7_*_1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 22:11:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Splunk-Alert-With-Cron-Triggering-when-it-shouldn-t/m-p/400085#M7042</guid>
      <dc:creator>oztraik9</dc:creator>
      <dc:date>2019-07-19T22:11:26Z</dc:date>
    </item>
  </channel>
</rss>

