25 Aug 2026
06:37 AM
- last edited on
25 Aug 2026
07:42 AM
by
MaciejNeumann
I'm configuring a SQL Extension and need to schedule data collection every hour from 5:00 PM to 8:00 AM daily.
I've tried using a Cron expression as of below but the extension keeps throwing an error "Schedule is not a valid quartz Cron expression"
0 17-23,0-8 * * ?
This does shows as valid when I verify using https://www.javainuse.com/cron
Just wondering if the extension supports combining ranges and lists in the same field (17-23,0-8) or do I need to create two different schedules to achieve this?
Solved! Go to Solution.
01 Sep 2026 03:05 AM
If anyone interested , managed to find a workaround to this issue , here is what worked for me
The schedule parameter needs to align with the regex pattern defined in the schema and the regex pattern does not seem to support multiple ranges like "0 17-23,0-8 * * ?" which span overnight
workaround is to use it as a variable , and define the cron schedule as a variable . This removes the limitations that is caused by the regex in schema
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"sqlOracle:
- group: "ABC"
subgroups:
- subgroup: "AfterHours"
schedule: "var:AfterHoursSchedule"
....................
- subgroup: "BusinessHours"
schedule: "var:BusinessHoursSchedule"
Featured Posts