24 Dec 2024 08:02 PM
When attempting to configure a query for the Database Extension 2.0 with a "cron schedule" to run every day at 22:00 (syntax: 0 22 * * * ), I receive the following error:
"Error message: Extension validation error. Constraint violations: $.sqlServer[0].schedule: is not defined in the schema and the schema does not allow additional properties"
Since this is a simple setup, I would like to know why this error occurs and whether this type of scheduling is supported.
Solved! Go to Solution.
24 Dec 2024 09:53 PM - edited 24 Dec 2024 10:04 PM
Replace the last '*' with a '?'. And update your minDynatraceVersion to at least 1.299
The SQL Datasource uses an engine called Quartz Scheduler.
This website: https://www.javainuse.com/cron can be used to test the expressions
NOTE: The SQL Datasource adds an extra zero at the beginning of the string, which are the seconds, so to test your expression add an extra zero on the website.
Example, to use this schedule in Dynatrace: `0 8 ? * 1-5`, validate it with `0 0 8 ? * 1-5` on the website.
The schema documents this as well (either 2nd or 4th index must be a ?)
New cron format release notes: https://github.com/dynatrace-extensions/extensions-schemas/releases/tag/1.299.0
26 Dec 2024 10:26 AM
Thanks @david_lopes 👨💻 for providing applicable solution 😉 .
@eddbarrientos19 You can proceed with an attempt and keep us posted.
Also PFA resources for more info:
Hoping it adds value.
BR,
Peter
26 Dec 2024 06:03 PM
@Peter_Youssef , thanks to you too for the extra info—it was really helpful.
I really appreciate both of you. Cheers!
26 Dec 2024 06:06 PM
Hi @eddbarrientos19
It's our pleasure to contribute together towards reaching applicable solutions.