-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
Sometimes a resource is limited or unavailable only during certain times, for example because of a fixed maintenance window for a specific service. It would therefor be nice to be able to optionally define a time frame during which the lock must be aquired. Outside that time frame, the resource should always be considered available.
OK, found a workaround by using a blocking job that runs (and acquires the lock) as long as the resource is unavailable and a Groovy expression in the jobs that need the resource which only tries to acquire the lock at certain time.
However, I need to implement this using JobDSL, but the documentation doesn't say anything about how to add a Groovy expression with JobDSL. Can you please clarify?