共用方式為


az acr task timer

管理工作的定時器觸發程式。

命令

名稱 Description 類型 狀態
az acr task timer add

將定時器觸發程式新增至工作。

核心 GA
az acr task timer list

列出工作的所有定時器觸發程式。

核心 GA
az acr task timer remove

從工作中移除定時器觸發程式。

核心 GA
az acr task timer update

更新工作的定時器觸發程式。

核心 GA

az acr task timer add

將定時器觸發程式新增至工作。

az acr task timer add --name
                      --registry
                      --schedule
                      --timer-name
                      [--enabled {false, true}]
                      [--resource-group]

範例

新增定時器觸發程式,將工作排程在星期一到星期五每天 09:30(UTC)。

az acr task timer add -n taskname -r registryname --timer-name t2 --schedule "30 9 * * 1-5"

必要參數

--name -n

工作的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>來設定預設登錄名稱。

--schedule

定時器觸發程式的排程,表示為cron表達式。

--timer-name

定時器觸發程式的名稱。

選擇性參數

--enabled

指出是否啟用定時器觸發程式。

接受的值: false, true
預設值: True
--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az acr task timer list

列出工作的所有定時器觸發程式。

az acr task timer list --name
                       --registry
                       [--resource-group]

範例

列出工作的所有定時器觸發程式。

az acr task timer list -n taskname -r registryname

必要參數

--name -n

工作的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>來設定預設登錄名稱。

選擇性參數

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az acr task timer remove

從工作中移除定時器觸發程式。

az acr task timer remove --name
                         --registry
                         --timer-name
                         [--resource-group]

範例

從工作中移除定時器觸發程式。

az acr task timer remove -n taskname -r registryname --timer-name t2

必要參數

--name -n

工作的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>來設定預設登錄名稱。

--timer-name

定時器觸發程式的名稱。

選擇性參數

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az acr task timer update

更新工作的定時器觸發程式。

az acr task timer update --name
                         --registry
                         --timer-name
                         [--enabled {false, true}]
                         [--resource-group]
                         [--schedule]

範例

更新工作的定時器觸發程式的排程。

az acr task timer update -n taskname -r registryname --timer-name t2 --schedule "0 12 * * *"

更新工作定時器觸發程序的狀態。

az acr task timer update -n taskname -r registryname --timer-name t2 --enabled False

必要參數

--name -n

工作的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>來設定預設登錄名稱。

--timer-name

定時器觸發程式的名稱。

選擇性參數

--enabled

指出是否啟用定時器觸發程式。

接受的值: false, true
--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--schedule

定時器觸發程式的排程,表示為cron表達式。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。