I am trying to write a query for all builds, but failed to understand the column [ScheduleTime] in the table [tbl_Schedule].
SELECT bd.DefinitionName 'Name', s.ScheduleTime 'ScheduleTime', s.ScheduleTime/1800 'Hour'
FROM [TFS_FTPDev].[dbo].[tbl_Schedule] s
inner join [TFS_FTPDev].[dbo].[tbl_BuildDefinition] bd on
bd.[DefinitionId]=s.[DefinitionId]
where ContinuousIntegrationType in (8,16)
order by s.ScheduleTime asc
If I divide by 3600, I get a sensible data, but it is not valid for all my builds... i.e. Build1 and build2 are scheduled for 13:00 for some days....
name ScheduleTime Hour
build1 43200 12
build2 43200 12
build3 68400 19
build4 77400 21.30
build5 79200 22
build6 82800 23
build7 84600 23.30
build8 84600 23.30
build9 84600 23.30
and the mapping is:
when 84600 then 23.30
when 79200 then 22
when 77400 then 21.30
when 68400 then 19
when 43200 then 12
UPDATE: [Using TFS API]
And this is the API results for a manually triggered/scheduled build...
And this is the subset of results