<?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 Alert scheduling - cron expression not working as expected in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/529755#M9965</link>
    <description>&lt;P&gt;I'm trying to schedule a particular alert to run on the first Monday of each fiscal quarter using this cron expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0 9 1-7 2,5,8,11 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My reading of this is "9:00am on the first Monday of Feb, May, Aug, and Nov".&lt;/P&gt;&lt;P&gt;However, with this month being November (11) for some reason it is running it every Monday. It unexpectedly ran this past Mon Nov 16th and has a "next scheduled time" of Mon Nov 23rd. Given the day-of-month restriction (3rd field) of 1-7 I would not have expected this to happen.&lt;/P&gt;&lt;P&gt;Any advice appreciated. Splunk Enterprise 8.0.6. Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 13:41:23 GMT</pubDate>
    <dc:creator>mattbg</dc:creator>
    <dc:date>2020-11-17T13:41:23Z</dc:date>
    <item>
      <title>Alert scheduling - cron expression not working as expected</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/529755#M9965</link>
      <description>&lt;P&gt;I'm trying to schedule a particular alert to run on the first Monday of each fiscal quarter using this cron expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0 9 1-7 2,5,8,11 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My reading of this is "9:00am on the first Monday of Feb, May, Aug, and Nov".&lt;/P&gt;&lt;P&gt;However, with this month being November (11) for some reason it is running it every Monday. It unexpectedly ran this past Mon Nov 16th and has a "next scheduled time" of Mon Nov 23rd. Given the day-of-month restriction (3rd field) of 1-7 I would not have expected this to happen.&lt;/P&gt;&lt;P&gt;Any advice appreciated. Splunk Enterprise 8.0.6. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 13:41:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/529755#M9965</guid>
      <dc:creator>mattbg</dc:creator>
      <dc:date>2020-11-17T13:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Alert scheduling - cron expression not working as expected</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/529762#M9966</link>
      <description>&lt;P&gt;According to crontab.guru, that cron expression means "At 09:00 on every day-of-month from 1 through 7 and on Monday in February, May, August, and November.” (&lt;A href="https://crontab.guru/#0_9_1-7_2,5,8,11_1" target="_blank"&gt;https://crontab.guru/#0_9_1-7_2,5,8,11_1&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;That the alert ran on the 16th seems like a bug to me.&amp;nbsp; I suggest opening a support request with Splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 14:28:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/529762#M9966</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-11-17T14:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alert scheduling - cron expression not working as expected</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/530163#M9971</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It's not a bug, crontab.guru gives the correct explenation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"At 09:00 on every day-of-month from 1 through 7 &lt;STRONG&gt;and on Monday&lt;/STRONG&gt; in February, May, August, and November.”&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the 16th was a Monday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 08:22:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/530163#M9971</guid>
      <dc:creator>teunlaan</dc:creator>
      <dc:date>2020-11-20T08:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Alert scheduling - cron expression not working as expected</title>
      <link>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/530654#M9977</link>
      <description>&lt;P&gt;I ended up using this cron expression to run on monthdays 1-7 regardless of the weekday:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0 9 1-7 2,5,8,11 *&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and then filtering my results so that I only got results on Mondays:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;…
| eval today_weekday=strftime(now(), “%w”)
| where today_weekday=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't use a time range filter because the underlying data can be generated at any time and the alert just sends the most recent results that exist at the start of the quarter.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 17:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Alert-scheduling-cron-expression-not-working-as-expected/m-p/530654#M9977</guid>
      <dc:creator>mattbg</dc:creator>
      <dc:date>2020-11-24T17:23:33Z</dc:date>
    </item>
  </channel>
</rss>

