Chethan S.
Chethan S.

Reputation: 556

Azure DevOps run a step only on certain days

For Azure build pipelines, is there any way to specify a condition to run a certain step on specific days of a week?

Our requirement is run certain security scans only on one day in a week instead of running them during each build. Though the step can be excluded from CI builds run for pushes to branches using the usual conditions, I am not able to figure out how do we allow it to run only on a certain day.

Upvotes: 1

Views: 1443

Answers (1)

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41805

If the schedule build is the only schedule build you can add a custom condition to tun the task only in this build:

and(always(), eq(variables['Build.Reason'],'Schedule'))

Upvotes: 1

Related Questions