<?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: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700710#M57454</link>
    <description>&lt;P&gt;Actually that is an interesting train of thought. You could do this to conditionally create a set of "easily not-fulfillable" conditions. Like some non-existent sourcetype being set only on those days you don't want the search to run.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Oct 2024 19:42:13 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-10-01T19:42:13Z</dc:date>
    <item>
      <title>Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578890#M47400</link>
      <description>Hello all, I would like to generate a scheduled PDF delivery dashboard for bi-weekly (every two weeks) on Friday. But if I use " 0 0 */14 * * ", the schedule doesn't run exactly every 14 days. It runs only on the 14th and 29th days of the month. And I want to run it on only Friday of every two weeks. So, I try cron notation " 0 0 */14 * 5 ". But, the schedule run on not only the 14th and 29th days of the month, but also every Friday. What kind of notation has to be used to meet both conditions for every 14 days and on Friday? And also is it possible to run the cron schedule at the end of every month?</description>
      <pubDate>Mon, 20 Dec 2021 09:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578890#M47400</guid>
      <dc:creator>kzkk</dc:creator>
      <dc:date>2021-12-20T09:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578908#M47405</link>
      <description>&lt;P&gt;The answer is "no" and "no". You can't do that with simple cron schedules.&lt;/P&gt;&lt;P&gt;What is not explained in splunk docs but how your typical cron schedule works is that if you specify day of the month as well as day of the week, the task is launched when any of those conditions are met. So your task would be launched at 14th and 28th of the month as well as on every friday.&lt;/P&gt;&lt;P&gt;There is no way to say "biweekly" or "end of the month". Cron is a simple tool after all &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 12:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578908#M47405</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-12-20T12:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578918#M47407</link>
      <description>So, I can't do anything for a bi-weekly schedule using a cron schedule, right? Thank you for the reply.</description>
      <pubDate>Mon, 20 Dec 2021 13:25:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578918#M47407</guid>
      <dc:creator>kzkk</dc:creator>
      <dc:date>2021-12-20T13:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578920#M47408</link>
      <description>&lt;P&gt;I can't think of anynway to specify it with a cron schedule.&lt;/P&gt;&lt;P&gt;If it was, for example, a normal unix script that was run from cron, I'd set a weekly schedule and checked week number within the script itself. But with a search... no idea.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 13:37:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/578920#M47408</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-12-20T13:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700698#M57449</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241619"&gt;@kzkk&lt;/a&gt;&amp;nbsp; You would have found an alternate way but this maybe useful in the future,&lt;/P&gt;&lt;P&gt;I had a similar requirement, and I solved it using a combination of a cron schedule and a condition in the search query. It's just two steps, first to setup a weekly schedule and then a condition to return result only once every two weeks.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Set up weekly cron schedule&lt;/STRONG&gt;. For example, to run at 6 p.m.&amp;nbsp; on every Sunday, use:&lt;BR /&gt;0 18 * * 0&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Add the following condition&lt;/STRONG&gt;&amp;nbsp;to your search query, placing it where the query runs efficiently without affecting the final output:&lt;BR /&gt;| &lt;SPAN class=""&gt;eval&lt;/SPAN&gt; &lt;SPAN class=""&gt;biweekly_cycle_start&lt;/SPAN&gt;=&lt;SPAN class=""&gt;1726977600&lt;/SPAN&gt;, &lt;SPAN&gt;biweekly=round(((relative_time(now(),"@d")-biweekly_cycle_start)/86400),0)%14&lt;/SPAN&gt;&amp;nbsp;| &lt;SPAN class=""&gt;where&lt;/SPAN&gt; &lt;SPAN class=""&gt;biweekly&lt;/SPAN&gt;=&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;In this example, I introduced a reference epoch time, biweekly_cycle_start, to calculate the two-week cycle. It represents the epoch time for two weeks before the alert schedule's starting date.&lt;/P&gt;&lt;P&gt;For instance, if your schedule begins on October 6, 2024, use the epoch time for the start of the day, September 22, 2024, which is 1726977600.&lt;/P&gt;&lt;P&gt;Each time the alert runs, the condition checks whether two weeks have passed since the last run. It returns results every two weeks and no results on the off week (seven days from the previous run).&lt;/P&gt;&lt;P&gt;Simply insert this condition where it will optimize the search performance, before the final transforming commands like stats, top, table, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 12:59:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700698#M57449</guid>
      <dc:creator>shalomsuresh</dc:creator>
      <dc:date>2024-10-02T12:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700703#M57450</link>
      <description>&lt;P&gt;Yes, that's some approach to the problem but while it might not make a big difference for a simple and lightweight search if your search is a big and heavy report you'd still be running it and stressing your servers. It's just that you wouldn't get any results back.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 18:26:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700703#M57450</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-10-01T18:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700704#M57451</link>
      <description>&lt;P&gt;Yep.. true. Its just once in a week. Its like we are utilising the splunk resource for the search but not making use of it. But, it still works the way we wanted it to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried to run this condition separately in a subsearch to avoid running the entire search, it worked for few days before it stopped working recently, not sure if version upgrade or something caused it.&lt;BR /&gt;[| makeresults&amp;nbsp;&lt;SPAN&gt;|&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;eval&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;biweekly_cycle_start&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;1726977600&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;biweekly=round(((relative_time(now(),"@d")-biweekly_cycle_start)/86400),0)%14&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;|&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;where&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;biweekly&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;It would be smooth if there's a way similar to this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 19:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700704#M57451</guid>
      <dc:creator>shalomsuresh</dc:creator>
      <dc:date>2024-10-01T19:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700710#M57454</link>
      <description>&lt;P&gt;Actually that is an interesting train of thought. You could do this to conditionally create a set of "easily not-fulfillable" conditions. Like some non-existent sourcetype being set only on those days you don't want the search to run.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 19:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700710#M57454</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-10-01T19:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cron notation for Bi-Weekly schedule PDF delivery dashboard in Splunk</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700728#M57455</link>
      <description>&lt;P&gt;&amp;lt;deleted my own answer&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 00:17:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Cron-notation-for-Bi-Weekly-schedule-PDF-delivery-dashboard-in/m-p/700728#M57455</guid>
      <dc:creator>dural_yyz</dc:creator>
      <dc:date>2024-10-02T00:17:52Z</dc:date>
    </item>
  </channel>
</rss>

