當您設定待命代理程式排程時,受管理 DevOps 集區會定期將佈建的代理程式計數與您在目前佈建配置中指定的待命代理程式計數進行比較。 它會視需要啟動新代理程式,以保持待命代理程式的數量。 您可以使用 [代理程式 ] 窗格來檢視集區中代理程式的目前狀態和計數。
手動模式最適合瞭解其持續整合和持續交付 (CI/CD) 管線使用模式的團隊。 當您使用手動選項時,您需要定義預先佈建配置。 您可以根據您對集區中最有可能被使用的代理和可能使用的代理數量的了解來定義您的方案。 您可以指定符合預估需求的代理配置數量。
您可以在resourcePredictionsProfile區段的agentProfile中指定手動待命代理程式佈建。 您可以在區 resourcePredictions 段中設定詳細資料。
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"agentProfile": {
"kind": "Stateless",
"resourcePredictionsProfile": {
"kind": "Manual"
},
"resourcePredictions": {
"timeZone": "Eastern Standard Time",
"daysData": [
{},
{
"00:00:00": 1,
"04:00:00": 0
},
{},
{},
{},
{},
{}
]
}
}
}
}
]
}
使用 timeZone 屬性為您的方案指定所需的時區。 預設值是 UTC。 若要擷取此屬性的時區名稱清單,請參閱 TimeZoneInfo.GetSystemTimeZones 方法。
您可以使用 daysData 清單來定義備用代理的排程。 清單可以 daysData 包含一個或七個項目。
daysData包含七個專案的清單會對應至星期幾,從星期日開始。 這七個項目中的每一個都可以有零個或多個 "time": count 條目,指定的時間為 24 小時格式,以及待命代理人數。 指定的待命代理數量會保留到下一個 "time": count 項目為止,該項目可以在同一天或接下來的任何一天。
daysData具有單一項目的清單定義了一個「全週模式」,其中的單一"time": count項目代表整週的待命代理人數量。
下列範例是手動待命代理程式配置。 它使用的是 Eastern Standard Time,其中單一代理被安排在週一至週五,上午 9:00 (待命代理數量 1) 至下午 5:00 (待命代理數量 0)。
{
"kind": "Stateless",
"resourcePredictions": {
"timeZone": "Eastern Standard Time",
"daysData": [
{},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{}
]
},
"resourcePredictionsProfile": {
"kind": "Manual"
}
}
單 daysData 一專案包含時間和待命代理程式計數的字典。 每個 "time" : count 項目都指定在指定時間開始排程的待命代理數量,時間使用 24 小時格式。 連續 "time" : count 專案會指定當天的排程代理程式計數序列。
"daysData": [
{}, # Schedule of standby agent count adjustments for Sunday
{ # Schedule of standby agent count adjustments for Monday
"09:00:00": 1, # Adjust standby agent count to 1
"17:00:00": 0 # Adjust standby agent count to 0
},
{ # Schedule of standby agent count adjustments for Tuesday
"09:00:00": 1,
"17:00:00": 0
},
{ # Schedule of standby agent count adjustments for Wednesday
"09:00:00": 1,
"17:00:00": 0
},
{ # Schedule of standby agent count adjustments for Thursday
"09:00:00": 1,
"17:00:00": 0
},
{ # Schedule of standby agent count adjustments for Friday
"09:00:00": 1,
"17:00:00": 0
},
{} # Schedule of standby agent count adjustments for Saturday
]
待命客服人員計數不會在一天結束時或週末自動重設為零。 指定空白 daysData 項目不會停用當天的待命客服專員。 空 daysData 的專案表示該天沒有待命代理程式計數排程的變更。 若要將待命代理程式設定為零,從特定時段開始,您必須明確提供 具有 "time" : countcount 的專案 0。
範例
若要不調整前一天(或如果您要設定本週的第一個時段,則為上週)結束時指定的待命代理的數量,請指定 daysData 項目且不輸入條目數:0。
{}
若要設定單一待命代理程式在 09:00:00 開始及在 17:00:00 停止(根據 resourcePredictions 屬性指定的時區),請指定以下設定:
{
"09:00:00": 1,
"17:00:00": 0
}
若要排程從午夜開始到 09:00:00的單一待命代理程式,然後從 09:00:00到 17:00:00排程 10 個待命代理程式,請指定以下配置:
{
"00:00:00": 1,
"09:00:00": 10,
"17:00:00": 0
}
若要排程待命代理從指定日期的 09:00:00 開始可用,於次日的 17:00:00 截止,請使用兩個連續的 daysData 項目:
{
"09:00:00": 1
},
{
"17:00:00": 0
}
您可以在agent-profile或更新集區時使用參數來設定代理程式。
az mdp pool create \
--agent-profile agent-profile.json
# other parameters omitted for space
下列範例顯示agent-profile.json檔案的內容。 您可以在參數區resourcePredictionsProfile段中agent-profile指定手動待命代理程式佈建。 在區 resourcePredictions 段中設定詳細資料:
{
"Stateless": {},
"resourcePredictionsProfile": {
"Manual": {}
},
"resourcePredictions": {
"timeZone": "Eastern Standard Time",
"daysData": [
{},
{
"00:00:00": 1,
"04:00:00": 0
},
{},
{},
{},
{},
{}
]
}
}
使用 timeZone 屬性指定您的配置的時區。 預設值是 UTC。 若要擷取此屬性的時區名稱清單,請參閱 TimeZoneInfo.GetSystemTimeZones 方法。
此 daysData 清單會定義待命代理程式的排程。 清單可以 daysData 包含一個或七個項目。
daysData包含七個專案的清單會對應至星期幾,從星期日開始。 這七個項目中的每一個都可以有零個或多個 "time": count 項目,以 24 小時格式指定時間,以及待命代理計數。 指定的待命代理人數將保持至下一個 "time": count 項目,該項目可以在同一天或隔一天出現。
daysData包含單一項目的清單定義了一個全週配置方案,其中的單一"time": count項目對應於整個星期的待命客服人員數量。
下列範例是手動待命代理程式配置。 此方案使用值0,配置的單個代理從週一至週五的上午9:00(備用代理數量Eastern Standard Time)至下午5:00(備用代理數量1)。
{
"Stateless": {},
"resourcePredictionsProfile": {
"Manual": {}
},
"resourcePredictions": {
"timeZone": "Eastern Standard Time",
"daysData": [
{},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{
"09:00:00": 1,
"17:00:00": 0
},
{}
]
}
}
單 daysData 一專案包含時間和待命代理程式計數的字典。 每個 "time" : count 項目都指定要在指定時間開始安排的待命代理數量,以 24 小時格式。 連續 "time" : count 專案會指定當天的排程代理程式計數序列。
"daysData": [
{}, # Schedule of standby agent count adjustments for Sunday
{ # Schedule of standby agent count adjustments for Monday
"09:00:00": 1, # Adjust standby agent count to 1
"17:00:00": 0 # Adjust standby agent count to 0
},
{ # Schedule of standby agent count adjustments for Tuesday
"09:00:00": 1,
"17:00:00": 0
},
{ # Schedule of standby agent count adjustments for Wednesday
"09:00:00": 1,
"17:00:00": 0
},
{ # Schedule of standby agent count adjustments for Thursday
"09:00:00": 1,
"17:00:00": 0
},
{ # Schedule of standby agent count adjustments for Friday
"09:00:00": 1,
"17:00:00": 0
},
{} # Schedule of standby agent count adjustments for Saturday
]
待命客服人員計數不會在一天結束時或週末自動重設為零。 指定空白 daysData 項目不會影響當天的待命人員。 空 daysData 的專案表示該天沒有待命代理程式計數排程的變更。 若要將待命代理程式設定為零,從特定時段開始,您必須明確提供 具有 "time" : countcount 的專案 0。
範例
如果您不想在前一天 (或一週,如果您要設定一週的第一個時段) 結束時調整指定的待命客服專員計數,請指定 daysData 項目為零:
{}
若要排程單一備援代理在 09:00:00 開始,並在 17:00:00 停止(使用您在 resourcePredictions 屬性中指定的時區),請指定以下配置:
{
"09:00:00": 1,
"17:00:00": 0
}
若要排程從午夜開始到 09:00:00的單一待命代理程式,然後是 10 個待命代理程式,直到 17:00:00,請指定下列組態:
{
"00:00:00": 1,
"09:00:00": 10,
"17:00:00": 0
}
若要排程待命客服專員以便從指定日期的 09:00:00 開始提供服務,並於第二天的 17:00:00 結束服務,請使用兩個連續的 daysData 項目:
{
"09:00:00": 1
},
{
"17:00:00": 0
}
您可以在agentProfile的resourcePredictionsProfile區段中指定手動待命代理程式佈建。 您可以在以下 resourcePredictions 部分中配置詳細資料:
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
...
agentProfile: {
kind: 'Stateless'
resourcePredictionsProfile: {
kind: 'Manual'
}
resourcePredictions: {
timeZone: 'Eastern Standard Time'
daysData: [
{}
{
'00:00:00': 1
'04:00:00': 0
}
{}
{}
{}
{}
{}
]
}
}
}
}
使用 timeZone 屬性為您的方案指定所需的時區。 預設值是 UTC。 若要擷取此屬性的時區名稱清單,請參閱 TimeZoneInfo.GetSystemTimeZones 方法。
此 daysData 清單會定義待命代理程式的排程。 清單可以 daysData 包含一個或七個項目。
daysData包含七個專案的清單會對應至星期幾,從星期日開始。 這七個條目中的每一個都可以有 0 個或以上的 'time': count 內容,這些內容以 24 小時格式指定時間,以及待命代理的人數。 指定的待命代理人計數會保留到下一個 'time': count 項目為止,該項目可以在同一天或接下來的某天。
daysData具有單一項目的清單會定義全週方案,其中單一'time': count項目對應於整個星期的待命代理人數量。
下列範例是手動待命代理方案,使用 Eastern Standard Time值,在星期一至星期五,從上午 9:00 (待命代理計數 1)到下午 5:00 (待命代理計數 0)配置單一代理:
{
kind: 'Stateless'
resourcePredictions: {
timeZone: 'Eastern Standard Time'
daysData: [
{}
{
'09:00:00': 1
'17:00:00': 0
}
{
'09:00:00': 1
'17:00:00': 0
}
{
'09:00:00': 1
'17:00:00': 0
}
{
'09:00:00': 1
'17:00:00': 0
}
{
'09:00:00': 1
'17:00:00': 0
}
{}
]
}
resourcePredictionsProfile: {
kind: 'Manual'
}
}
單 daysData 一專案包含時間和待命代理程式計數的字典。 每個 'time' : count 項目都指定要在指定時間開始排程待命代理的數量,使用 24 小時格式。 連續 'time' : count 專案會指定當天的排程代理程式計數序列。
daysData: [
{} // Schedule of standby agent count adjustments for Sunday
{ // Schedule of standby agent count adjustments for Monday
'09:00:00': 1 // Adjust standby agent count to 1
'17:00:00': 0 // Adjust standby agent count to 0
}
{ // Schedule of standby agent count adjustments for Tuesday
'09:00:00': 1
'17:00:00': 0
}
{ // Schedule of standby agent count adjustments for Wednesday
'09:00:00': 1
'17:00:00': 0
}
{ // Schedule of standby agent count adjustments for Thursday
'09:00:00': 1
'17:00:00': 0
}
{ // Schedule of standby agent count adjustments for Friday
'09:00:00': 1
'17:00:00': 0
}
{} // Schedule of standby agent count adjustments for Saturday
]
待命代理計數不會在一天結束時或一週結束時自動重設為零,並且指定空的 daysData 項目不會停用當天的待命代理。 空 daysData 的專案表示該天沒有待命代理程式計數排程的變更。 若要將待命代理程式設定為零,從特定時段開始,您必須明確提供 具有 "time" : countcount 的專案 0。
範例
若要不調整前一天結束時(或如果您要設定本週的第一個時段,則在一週結束時)指定的備用客服代理數量,請指定daysData項目,其中條目數為零。
{}
若要排定單一待命代理程式在 09:00:00 開始及在 17:00:00 停止(依據 resourcePredictions 屬性中指定的時區),請指定以下配置:
{
'09:00:00': 1
'17:00:00': 0
}
若要排程一個從午夜開始到 09:00:00的單一待命代理程式,接著是直到 17:00:00 的 10 個待命代理程式,請指定下列配置:
{
'00:00:00': 1
'09:00:00': 10
'17:00:00': 0
}
若要排程值勤客服人員從指定日開始於 09:00:00 可用,並在次日於 17:00:00 結束,請使用兩個連續 daysData 項目:
{
'09:00:00': 1
}
{
'17:00:00': 0
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "fabrikam-managed-pool",
"type": "microsoft.devopsinfrastructure/pools",
"apiVersion": "2025-09-20",
"location": "eastus",
"properties": {
...
"agentProfile": {
"kind": "Stateless",
"resourcePredictionsProfile": {
"kind": "Manual"
},
"resourcePredictions": {
"timeZone": "Eastern Standard Time",
"daysData": [
{},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{}
]
}
}
}
}
]
}
{
"Stateless": {},
"resourcePredictionsProfile": {
"Manual": {}
},
"resourcePredictions": {
"timeZone": "Eastern Standard Time",
"daysData": [
{},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{
"09:00:00": 4,
"17:00:00": 0
},
{}
]
}
}
resource managedDevOpsPools 'Microsoft.DevOpsInfrastructure/pools@2025-09-20' = {
name: 'fabrikam-managed-pool'
location: 'eastus'
properties: {
...
agentProfile: {
kind: 'Stateless'
resourcePredictionsProfile: {
kind: 'Manual'
}
resourcePredictions: {
timeZone: 'Eastern Standard Time'
daysData: [
{}
{
'09:00:00': 4
'17:00:00': 0
}
{
'09:00:00': 4
'17:00:00': 0
}
{
'09:00:00': 4
'17:00:00': 0
}
{
'09:00:00': 4
'17:00:00': 0
}
{
'09:00:00': 4
'17:00:00': 0
}
{}
]
}
}
}
}