How to Safely Append New Blackout Datetime to Pipeline Schedule Without Overwriting Existing Ones?
Hi community,
I’d like to ask how I can set blackout dates for a specific pipeline.
Recently, the blackout date format changed — now it’s possible to specify not only the date but also the time.
According to the metadata, the blackout date fields are:
jsonPath($, "$schedule.repeat.blackout_datetimes[*].startDate")
and
jsonPath($, "$schedule.repeat.blackout_datetimes[*].endDate")
My questions are:
How can I add a new blackout datetime if no blackout is currently defined (i.e. the fields don't exist yet, and concat fails)?
When a blackout already exists, adding a new one overwrites the existing start and end date/time.
I’m looking for a universal approach to append one new blackout datetime (start + end) to the list — without creating duplicates, and whether or not blackout dates already exist.
Thank you very much in advance!