The Batch Job job type creates an Azure Batch Job and a single Task inside it per Polysync execution, then polls the Task to completion. The discovery artefact is an existing Batch Job template (used to clone defaults such as pool, container image, command line) — Polysync stores its Job ID in the External Id.
This job type is supported on the Azure Batch platform.
Batch Job (set automatically on import).GET https://{batchAccountUrl}/jobs?$select=id,displayName,state
(paginated via nextLink / $skiptoken).
Polysync forwards Input + Input&Output parameter values as
environmentSettings on the new Task:
{
"id": "<task-id>",
"commandLine": "<task-command>",
"environmentSettings": [
{ "name": "<param-1>", "value": "<value-1>" },
{ "name": "<param-2>", "value": "<value-2>" }
],
"containerSettings": {
"imageName": "<image>",
"containerRunOptions": "<options>"
}
}
| Direction | Sent as environmentSettings |
Updated from response |
|---|---|---|
Input |
✅ | ❌ |
Output |
❌ | ❌ (not supported) |
Input&Output |
✅ | ❌ (not supported) |
Values are strings; the Task is responsible for parsing typed values
from %NAME% env vars.
Output parameters are not supported. Persist task results to Azure Storage / Application Insights and reference them downstream.
Polysync creates a new Batch Job
(POST /jobs) with:
{
"id": "<polysync-generated-job-id>",
"displayName": "<polysync-name>",
"poolInfo": { "poolId": "<source-job-pool>" },
"onAllTasksComplete": "terminateJob"
}
A single Task is added via POST /jobs/{jobId}/tasks using the
payload shown above.
The composite RunId is "{jobId}/{taskId}".
Status is polled by reading the Task with
GET /jobs/{jobId}/tasks/{taskId} and decoded:
| Batch task state | Polysync status |
|---|---|
active / preparing |
Starting |
running |
Running |
completed with executionInfo.exitCode == 0 |
Success |
completed with executionInfo.exitCode != 0 |
Failed |
| (other) | Unknown |
Cancel is supported via
POST /jobs/{jobId}/tasks/{taskId}/terminate followed by
POST /jobs/{jobId}/terminate for a clean teardown.
https://portal.azure.com/#resource/subscriptions/{subId}/resourceGroups/{rg}
/providers/Microsoft.Batch/batchAccounts/{account}/jobs/{jobId}
constraints.maxWallClockTime on the template to bound
run time and avoid stuck polls.preparing forever — the Pool has no available
compute nodes (autoscale formula or quota). Inspect the Pool in the
Azure portal.exitCode != 0 but no visible error — Batch surfaces stderr in
executionInfo.failureInfo.message; check the monitor link for the
detail.PoolNotFound — the source Job's poolInfo.poolId no longer
exists. Update the template Batch Job's pool.