<?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: SQL Extension 2.0: Cron Schedule Spanning Midnight in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/SQL-Extension-2-0-Cron-Schedule-Spanning-Midnight/m-p/303951#M7391</link>
    <description>&lt;P&gt;If anyone interested , managed to find a workaround to this issue , here is what worked for me&lt;/P&gt;&lt;P&gt;The &lt;A href="https://docs.dynatrace.com/docs/shortlink/sql-reference#schedule" target="_self"&gt;schedule&lt;/A&gt; parameter needs to align with the regex pattern defined in the schema and the regex pattern does not seem to support&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;multiple ranges&amp;nbsp;like "0 17-23,0-8 * * ?" which span overnight&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="p_devulapalli_0-1788227066654.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/34178i93F3E9CA18C5B93D/image-size/medium?v=v2&amp;amp;px=400" alt="p_devulapalli_0-1788227066654.png" title="p_devulapalli_0-1788227066654.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;workaround is to use it as a &lt;A href="https://docs.dynatrace.com/docs/shortlink/sql-reference#control-frequency" target="_self"&gt;variable&lt;/A&gt; , and define the cron schedule as a variable . This removes the limitations that is caused by the regex in schema&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;1)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Declare the variable in &lt;EM&gt;vars&lt;/EM&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;vars:
  - id: "businessHoursSchedule"
    displayName: "Business Hours Schedule"
    description: "Cron Schedule for Business Hours"
    type: "text"
    defaultValue: "0/10 8-16 ? * *"
  - id: "AfterHoursSchedule"
    displayName: "After Hours Schedule"
    description: "Cron Schedule for After Hours"
    defaultValue: "0 17-23,0-8 ? * *"
    type: "text"​&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;SPAN&gt;2)&amp;nbsp;Reference the variable in the&amp;nbsp;&lt;EM&gt;schedule&amp;nbsp;&lt;/EM&gt;field&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;sqlOracle:
  - group: "ABC"
    subgroups:
      - subgroup: "AfterHours"
        schedule: "var:AfterHoursSchedule"

....................
      - subgroup: "BusinessHours"
        schedule: "var:BusinessHoursSchedule"&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BR /&gt;When the extension is activated, users can provide their own cron expression in the schedule field via the extension configuration UI or it defaults to using what's defined in the extension yaml&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="p_devulapalli_1-1788228232317.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/34181iEFEE652A6ECE4900/image-dimensions/630x154?v=v2" alt="p_devulapalli_1-1788228232317.png" title="p_devulapalli_1-1788228232317.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 01 Sep 2026 02:05:37 GMT</pubDate>
    <dc:creator>p_devulapalli</dc:creator>
    <dc:date>2026-09-01T02:05:37Z</dc:date>
    <item>
      <title>SQL Extension 2.0: Cron Schedule Spanning Midnight</title>
      <link>https://community.dynatrace.com/t5/Extensions/SQL-Extension-2-0-Cron-Schedule-Spanning-Midnight/m-p/303742#M7390</link>
      <description>&lt;P&gt;I'm configuring a SQL Extension&amp;nbsp; and need to schedule data collection every hour from 5:00 PM to 8:00 AM daily.&lt;/P&gt;
&lt;P&gt;I've tried using a Cron expression as of below but the extension keeps throwing an error "&lt;SPAN&gt;Schedule is not a valid quartz Cron expression"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;0 17-23,0-8 * * ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="p_devulapalli_0-1787635482182.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/34121i64BAD94C3E8353FB/image-size/medium?v=v2&amp;amp;px=400" alt="p_devulapalli_0-1787635482182.png" title="p_devulapalli_0-1787635482182.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This does shows as valid when I verify using&amp;nbsp;&lt;A href="https://www.javainuse.com/cron" target="_blank" rel="noopener"&gt;https://www.javainuse.com/cron&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Just wondering if the extension supports&amp;nbsp;combining ranges and lists in the same field (17-23,0-8) or do I need to create two different schedules to achieve this?&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV class=""&gt;0 17-23 ? * *&lt;/DIV&gt;
&lt;DIV class=""&gt;0 0-8 ? * *&lt;/DIV&gt;
&lt;DIV class=""&gt;Any advice please?&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Aug 2026 06:42:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/SQL-Extension-2-0-Cron-Schedule-Spanning-Midnight/m-p/303742#M7390</guid>
      <dc:creator>p_devulapalli</dc:creator>
      <dc:date>2026-08-25T06:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Extension 2.0: Cron Schedule Spanning Midnight</title>
      <link>https://community.dynatrace.com/t5/Extensions/SQL-Extension-2-0-Cron-Schedule-Spanning-Midnight/m-p/303951#M7391</link>
      <description>&lt;P&gt;If anyone interested , managed to find a workaround to this issue , here is what worked for me&lt;/P&gt;&lt;P&gt;The &lt;A href="https://docs.dynatrace.com/docs/shortlink/sql-reference#schedule" target="_self"&gt;schedule&lt;/A&gt; parameter needs to align with the regex pattern defined in the schema and the regex pattern does not seem to support&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;multiple ranges&amp;nbsp;like "0 17-23,0-8 * * ?" which span overnight&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="p_devulapalli_0-1788227066654.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/34178i93F3E9CA18C5B93D/image-size/medium?v=v2&amp;amp;px=400" alt="p_devulapalli_0-1788227066654.png" title="p_devulapalli_0-1788227066654.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;workaround is to use it as a &lt;A href="https://docs.dynatrace.com/docs/shortlink/sql-reference#control-frequency" target="_self"&gt;variable&lt;/A&gt; , and define the cron schedule as a variable . This removes the limitations that is caused by the regex in schema&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;1)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Declare the variable in &lt;EM&gt;vars&lt;/EM&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;vars:
  - id: "businessHoursSchedule"
    displayName: "Business Hours Schedule"
    description: "Cron Schedule for Business Hours"
    type: "text"
    defaultValue: "0/10 8-16 ? * *"
  - id: "AfterHoursSchedule"
    displayName: "After Hours Schedule"
    description: "Cron Schedule for After Hours"
    defaultValue: "0 17-23,0-8 ? * *"
    type: "text"​&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;SPAN&gt;2)&amp;nbsp;Reference the variable in the&amp;nbsp;&lt;EM&gt;schedule&amp;nbsp;&lt;/EM&gt;field&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;sqlOracle:
  - group: "ABC"
    subgroups:
      - subgroup: "AfterHours"
        schedule: "var:AfterHoursSchedule"

....................
      - subgroup: "BusinessHours"
        schedule: "var:BusinessHoursSchedule"&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BR /&gt;When the extension is activated, users can provide their own cron expression in the schedule field via the extension configuration UI or it defaults to using what's defined in the extension yaml&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="p_devulapalli_1-1788228232317.png"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/34181iEFEE652A6ECE4900/image-dimensions/630x154?v=v2" alt="p_devulapalli_1-1788228232317.png" title="p_devulapalli_1-1788228232317.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Sep 2026 02:05:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/SQL-Extension-2-0-Cron-Schedule-Spanning-Midnight/m-p/303951#M7391</guid>
      <dc:creator>p_devulapalli</dc:creator>
      <dc:date>2026-09-01T02:05:37Z</dc:date>
    </item>
  </channel>
</rss>

