AKS CronJob Job

The AKS CronJob job type triggers an on-demand run of a Kubernetes CronJob template. Polysync reads the CronJob's spec.jobTemplate, overlays the first container's env vars with the Polysync parameter values, and submits the result as a new one-shot Job in the same namespace (the CronJob's own schedule is not modified). The CronJob is identified by its name — Polysync stores that in the External Id.

This job type is supported on the Azure Kubernetes Service platform.

Required job fields

  • External Id — the CronJob's metadata.name in the configured namespace.
  • Job TypeAKS CronJob (set automatically on import).

Job discovery

BatchV1.ListNamespacedCronJob in the configured namespace. The parameter list is taken from spec.jobTemplate.spec.template.spec.containers[0].env.

Parameter handling

Identical to AKS Job:

Direction Sent as container env vars Updated from response
Input
Output (not supported)
Input&Output (not supported)

Polysync does not pause the CronJob's recurring schedule — both the on-demand run and the regular schedule continue to fire independently. If you need to replace the schedule with Polysync orchestration, set spec.suspend: true on the CronJob in the cluster.

Output parameters are not supported.

Execution flow

  1. Polysync reads the CronJob's spec.jobTemplate.
  2. Container[0]'s env vars are overlaid with Polysync parameter values.
  3. A new V1Job is created via BatchV1.CreateNamespacedJob.
  4. Status polling and cancel match AKS Job.

Monitor URL

https://portal.azure.com/#resource/subscriptions/{subId}/resourceGroups/{rg}
  /providers/Microsoft.ContainerService/managedClusters/{clusterName}/workloads

Best practices

  • For workloads that should only run from Polysync, set spec.suspend: true on the CronJob so the cluster's scheduler does not also fire it.
  • Use CronJob env vars (rather than args / command) for all run-time inputs.

Troubleshooting

  • CronJob also fires from the cluster — by design; set spec.suspend: true if you want exclusive Polysync control.