<?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: Why does my Cron for Sunday fail? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617911#M214749</link>
    <description>&lt;P&gt;When I click on the link for&amp;nbsp;&lt;A href="https://crontab.guru/#00_12_1,2,3,4,5,6,7_*_0" target="_blank" rel="nofollow noopener noreferrer"&gt;https://crontab.guru/#00_12_1,2,3,4,5,6,7_*_0&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; the next run date is&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;at 2022-10-23 12:00:00 which is not the first Sunday Nov 6th 2022.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I did some digging and found if you use the following: 00 12 1-7 * */7 (&lt;A href="https://crontab.guru/#00_12_1-7_*_*/7" target="_blank" rel="noopener"&gt;https://crontab.guru/#00_12_1-7_*_*/7&lt;/A&gt;) in crontab it appears to be what you are looking for.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I attempt to use that cron in a Splunk schedule it does not work.&amp;nbsp; It appears that Splunk is not like the every 7th day trick */7.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reviewing Splunk documentation:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Alert/CronExpressions" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Alert/CronExpressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It appears the only values that can be used are 0-6.&amp;nbsp; Not sure if at this time if there is a way to run on the first Sunday of the month with cron in Splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;travis&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 20:29:49 GMT</pubDate>
    <dc:creator>thall79</dc:creator>
    <dc:date>2022-10-20T20:29:49Z</dc:date>
    <item>
      <title>Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615256#M213817</link>
      <description>&lt;P&gt;According to the docs for cron the Sunday code is 0.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I try to run this cron for the first Sunday of the month it displays Saturday!&lt;/P&gt;
&lt;P&gt;00 12 1,2,3,4,5,6,7 * 0&lt;/P&gt;
&lt;P&gt;Of course, when I use 6 for Saturday, it works!&lt;/P&gt;
&lt;P&gt;00 12 1,2,3,4,5,6,7 * 6&lt;/P&gt;
&lt;P&gt;What code am I supposed to use for Sunday?&lt;/P&gt;
&lt;P&gt;TIA!&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 18:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615256#M213817</guid>
      <dc:creator>dlcrooks</dc:creator>
      <dc:date>2022-09-29T18:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615263#M213820</link>
      <description>&lt;P&gt;Interesting, also this &lt;A href="https://crontab.guru/#00_12_1,2,3,4,5,6,7_*_0" target="_blank"&gt;https://crontab.guru/#00_12_1,2,3,4,5,6,7_*_0&lt;/A&gt; shows that expression is correct and should run at 12:00 on 1st Sun on every month.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 20:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615263#M213820</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-09-29T20:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615265#M213822</link>
      <description>&lt;P&gt;i am trying to schedule for this weekend and Splunk is not helping&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 20:23:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615265#M213822</guid>
      <dc:creator>dlcrooks</dc:creator>
      <dc:date>2022-09-29T20:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615299#M213835</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/91177"&gt;@dlcrooks&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I don't know why this happens, I should have your data to check, but anyway, as a workaround, you could put a filter in your main search to be sure that your alert is executed only the first Monday in a month, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt; date_mday&amp;lt;7 date_wday=sunday&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 06:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615299#M213835</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-30T06:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615387#M213868</link>
      <description>&lt;P&gt;My data has nothing to do with the cron string not working in Splunk. That is a bug in Splunk.&lt;/P&gt;&lt;P&gt;I will try out your suggestion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 13:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615387#M213868</guid>
      <dc:creator>dlcrooks</dc:creator>
      <dc:date>2022-09-30T13:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615401#M213870</link>
      <description>When you are expecting that this is a bug, please send bug report to Splunk Support!</description>
      <pubDate>Fri, 30 Sep 2022 14:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615401#M213870</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-09-30T14:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615409#M213871</link>
      <description>&lt;P&gt;No, I tried the suggestion and I do not want to filter my data as I need the search scheduled.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 14:48:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/615409#M213871</guid>
      <dc:creator>dlcrooks</dc:creator>
      <dc:date>2022-09-30T14:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617911#M214749</link>
      <description>&lt;P&gt;When I click on the link for&amp;nbsp;&lt;A href="https://crontab.guru/#00_12_1,2,3,4,5,6,7_*_0" target="_blank" rel="nofollow noopener noreferrer"&gt;https://crontab.guru/#00_12_1,2,3,4,5,6,7_*_0&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; the next run date is&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;at 2022-10-23 12:00:00 which is not the first Sunday Nov 6th 2022.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I did some digging and found if you use the following: 00 12 1-7 * */7 (&lt;A href="https://crontab.guru/#00_12_1-7_*_*/7" target="_blank" rel="noopener"&gt;https://crontab.guru/#00_12_1-7_*_*/7&lt;/A&gt;) in crontab it appears to be what you are looking for.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I attempt to use that cron in a Splunk schedule it does not work.&amp;nbsp; It appears that Splunk is not like the every 7th day trick */7.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reviewing Splunk documentation:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Alert/CronExpressions" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Alert/CronExpressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It appears the only values that can be used are 0-6.&amp;nbsp; Not sure if at this time if there is a way to run on the first Sunday of the month with cron in Splunk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;travis&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 20:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617911#M214749</guid>
      <dc:creator>thall79</dc:creator>
      <dc:date>2022-10-20T20:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617913#M214751</link>
      <description>&lt;P&gt;So, if the values are 0-6 then Sunday is 0 instead of 7...&amp;nbsp; I will have to play with it some more myself.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;David L. Crooks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 20:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617913#M214751</guid>
      <dc:creator>dlcrooks</dc:creator>
      <dc:date>2022-10-20T20:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617921#M214755</link>
      <description>&lt;P&gt;I was thinking the same thing, but when I plugged in 0 instead of 7 Splunk gives me an error of invalid cron_schedule.&amp;nbsp; Now I did get 1 to work, but that was not helpful and seems the job will start on Nov 1st and then run everyday according to crontab.guru.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;travis&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 21:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617921#M214755</guid>
      <dc:creator>thall79</dc:creator>
      <dc:date>2022-10-20T21:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my Cron for Sunday fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617984#M214784</link>
      <description>&lt;P&gt;I think an issue is that the cron parser in Splunk is not the same as crontab.guru. I wish it was...&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 13:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-Cron-for-Sunday-fail/m-p/617984#M214784</guid>
      <dc:creator>dlcrooks</dc:creator>
      <dc:date>2022-10-21T13:53:05Z</dc:date>
    </item>
  </channel>
</rss>

