1

I'm trying to create a scheduled build. To check my syntax i tried to start the build manually, but got the following message:

Printscreen Error Message

My yaml file looks as follows:

name: $(Build.DefinitionName)_$(build.buildId)
trigger: none

schedules:
- cron: "0 2 * * Mon-Fri"
  displayName: M-F 3:00 AM
  branches:
    include:
    - master

Anybody a suggestion? Or is it simply impossible to start a scheduled build manually?

Amittai Shapira
  • 3,749
  • 1
  • 30
  • 54
Oswald
  • 1,252
  • 20
  • 32
  • Even if you have a "schedule" trigger, you can still queue the build whenever you want... I think the error is in the YAML - you can set trigger to schedule and then queue the build, it should start immediately – Amittai Shapira Jul 18 '19 at 14:44
  • @AmittaiShapira: What du so mean with "set the trigger to schedule"? – Oswald Jul 18 '19 at 14:47
  • my bad, it looks like your syntax is fine, there's some discussion on scheduled triggers on the Microsoft developer community, you may want to start there (they're usually very helpful): https://developercommunity.visualstudio.com/content/problem/613157/new-cron-schedule-not-working.html – Amittai Shapira Jul 18 '19 at 14:56
  • After `trigger: none` try adding the setting `pr: none` on a new line as I think this may also be required – MikeS Jul 18 '19 at 15:06
  • @AmittaiShapira I've looked across that issue, but these it looks not equally to my mistake.. – Oswald Jul 18 '19 at 15:07
  • @MikeS Sounds good, nice idea. But: Not working... Still the same error (except the line number is +1) – Oswald Jul 18 '19 at 15:08
  • May it's not supported by Azure DevOps Server 2019 OnPrem (17.143.28912.1 (AzureDevOps2019.0.1))? – Oswald Jul 18 '19 at 15:09
  • 1
    Makes sense - Cron syntax was introduced in Azure DevOps Service Sprint 153, in June (https://learn.microsoft.com/en-us/azure/devops/release-notes/2019/pipelines/sprint-153-update) and Azure DevOps Server latest update was 2019.0.1 in May (https://learn.microsoft.com/en-us/azure/devops/server/release-notes/azuredevops2019?view=azure-devops) – Amittai Shapira Jul 18 '19 at 15:40
  • 1
    When Asking question regarding Azure DevOps on prem you may want to use the "azure-devops-server" tag, to avoid confusion with the cloud Azure DevOps Service – Amittai Shapira Jul 18 '19 at 15:42
  • I‘m currently not at the office, gonna check it on monday. But I belive unfortunatelly yes. – Oswald Jul 19 '19 at 08:05

1 Answers1

1

The problem is that YAML Scheduled Triggers are not supported in Azure DevOps Server 2019, only in Azure DevOps Service, see the official documentation:

Scheduled builds are not yet supported in YAML syntax. After you create your YAML build pipeline, you can use pipeline settings to specify a scheduled trigger.

Amittai Shapira
  • 3,749
  • 1
  • 30
  • 54