09 Apr 2025
07:59 PM
- last edited on
14 Apr 2025
08:14 AM
by
MaciejNeumann
Hi There,
I am working on custom extension using SQL Data Source, and I am using Custom Extensions Creator to evaluate the cron format expression for the Schedule. However, while working there I found two issues, one being expression evaluation do not match with the recommended testing expression using javainuse.com/cron, and another being dynatrace not supporting the expression when field used both "value list separator" and "range of values", whereas recommended testing expression website allows it.
In case one, if expression used is "5 8-20 ? 1-5".
Dynatrace evaluates help text states that At 5 minutes past the hour, between 08:00 AM and 08:59 PM, Monday through Friday.
Online Cron Expression Generator states that At 5 minute every hour between 8 and 20 every day between Sunday and Thursday.
In case two, expression used is "5 0,4-23 ? 1-5".
Dynatrace evaluates help text states that Must be a valid quartz cron format without seconds, example 0/5 14 * * ?
Online Cron Expression Generator states that At 5 minute at hour 0 and every hour between 8 and 20 every day between Sunday and Thursday.
MinDynatrace version checked against 1.307.0 and 1.312.0.
As per the note, I added first field with 0 for seconds in the javainuse.com/cron.
Kindly recommend what to use for last field "1-5" for Monday through Friday, and field with multiple combination of valid special characters ( , - ).
Kind regards,
Darshan Doshi
11 Apr 2025 04:13 PM
I had a support ticket opened for this one.
I was recommended to follow evaluation as per javainuse.com/cron, and team will work on fixing the help text which is misleading the evaluation result.
Therefore, the last field 1-5 is for Sunday to Thursday. If we want from Monday to Friday, we need to use 2-6.
Also, it looks like fields might work in circular mode, so if we want, we can make use of 4-1 instead of 0,4-23 in the hour field (the 2nd field) in the expression shared in case two above.
I will be sharing confirmation, once I complete implementing it in my organization and after seeing the outcome.
Kind regards,
Darshan Doshi