An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hi @Yue Wang ,
Yes, this behaviour is expected. Task result cannot currently be added directly to the standard Azure portal Jobs list.
In Azure Batch, the job state Completed is a lifecycle state. It means that all tasks in the job have terminated and that the job will no longer accept additional tasks or changes. It does not mean that every task completed successfully. A task can reach the Completed state after succeeding, failing after exhausting its retry limit, failing to start, or being terminated.
At present, the Azure portal’s Jobs list does not provide a built-in column that aggregates task success or failure for each job. Therefore, the job can appear as Completed even when one or more of its tasks failed.
You can use one of the following alternatives.
1. Retrieve task counts with Azure CLI
The following command returns the number of active, running, completed, succeeded, and failed tasks for a job:
az batch job task-counts show \
--job-id <job-id> \
--account-name <batch-account-name> \
--account-endpoint <batch-account-endpoint>
2. Use the Batch API or SDK
Azure Batch provides the Get Job Task Counts operation, which returns aggregate counts for successful and failed tasks. The operation is available through the Batch REST API and supported SDKs.
3. Use Azure Monitor for multiple jobs
For an account-level view, Azure Monitor exposes the following Batch metrics:
Task Complete Events
Task Fail Events
Both metrics support the jobId dimension. You can split the metric by job ID, create an Azure dashboard showing failed tasks per job, and optionally configure an alert when the failed-task count is greater than zero.
--please don't forget to close up the thread here by marking answer if the reply is helpful--