I have a yaml pipeline where I would like to set the CRON minutes with a Variable Pipeline to avoid making commits and pull requests.
When I try to do something like this I get syntax errors:
schedules:
- cron: "*/$(PipelineVariable) * * * *"
displayName: Daily midnight build
It doesn't work inside the string - this is the error I get:
Encountered error(s) while parsing pipeline YAML: /execution.yaml (Line: 8, Col: 4):
Error while validating cron input. Improperly formed cron syntax: '*/$(Minutes) * * * *'.
And it doesn't work outside either.
/execution.yaml (Line: 8, Col: 4):
Error while validating cron input. Improperly formed cron syntax: '$(CronTab)'.
Why doesn't it accept the syntax from a Pipeline variable?
The following documentation has mentioned "You cannot use pipeline variables when specifying schedules.":
You may submit a suggestion at website below:
https://developercommunity.visualstudio.com/content/idea/post.html?space=21