This question is related to How to script build schedule using Azure DevOps REST Api?
Given:
- A script to set build schedule is run at 7:59am EST
- The schedule is every 5 minutes regardless of the changes every day in EST on master
- According to Fiddler:
ClientConnected: 07:59:28.854
ClientBeginRequest: 08:00:44.334
GotRequestHeaders: 08:00:44.334
ClientDoneRequest: 08:00:44.334
- The response headers contain
Date: Wed, 06 Nov 2019 13:00:49 GMT
- The PUT request contains the following JSON fragment (see the text below):
- The PUT request response:
So, here is the JSON request body fragment related to the schedules:
"schedules": [
{
"branchFilters": [
"+refs/heads/master"
],
"startMinutes": 59,
"scheduleOnlyWithChanges": false,
"startHours": 7,
"timeZoneId": "Eastern Standard Time",
"daysToBuild": 127
},
{
"branchFilters": [
"+refs/heads/master"
],
"startMinutes": 4,
"scheduleOnlyWithChanges": false,
"startHours": 8,
"timeZoneId": "Eastern Standard Time",
"daysToBuild": 127
},
{
"branchFilters": [
"+refs/heads/master"
],
"startMinutes": 9,
"scheduleOnlyWithChanges": false,
"startHours": 8,
"timeZoneId": "Eastern Standard Time",
"daysToBuild": 127
},
...
And the respective response JSON fragment is:
"schedules": [
{
"branchFilters": [
"+refs/heads/master"
],
"timeZoneId": "Eastern Standard Time",
"startHours": 7,
"startMinutes": 59,
"daysToBuild": "all",
"scheduleJobId": "21a1da8a-e508-40ad-8716-d3e1483f05d7",
"scheduleOnlyWithChanges": false
},
{
"branchFilters": [
"+refs/heads/master"
],
"timeZoneId": "Eastern Standard Time",
"startHours": 8,
"startMinutes": 4,
"daysToBuild": "all",
"scheduleJobId": "425eaa93-9f35-4dcb-aeb0-437479caab8d",
"scheduleOnlyWithChanges": false
},
{
"branchFilters": [
"+refs/heads/master"
],
"timeZoneId": "Eastern Standard Time",
"startHours": 8,
"startMinutes": 9,
"daysToBuild": "all",
"scheduleJobId": "a109daa2-f65b-4792-b599-594fdf1363ca",
"scheduleOnlyWithChanges": false
},
...
So far so good. Given all that my expectation is to find the schedules starting at 7:59 (because that is what I am asking and the response confirms it) in EST and the first schedule kick in at 8:04 EST.
However, this is not the case. Observe the actual result:
- The schedule as it appears in the GUI:
...
- And the actual scheduled builds as reported by the build history:
The schedules do cover the entire 24 hour range at 5 minute intervals as expected. But:
- Why does the first scheduled build happen at 9:04am EST instead of 8:04am EST?
- Why do the schedules in the GUI start at 4:14am?