az iot central scheduled-job

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.37.0 or higher). The extension will automatically install the first time you run an az iot central scheduled-job command. Learn more about extensions.

Manage and configure IoT Central schedule job.

Commands

Name Description Type Status
az iot central scheduled-job create

Create a scheduled job by ID.

Extension GA
az iot central scheduled-job delete

Delete an existing scheduled job by ID.

Extension GA
az iot central scheduled-job list

Get the list of scheduled job definitions in an application.

Extension GA
az iot central scheduled-job list-runs

Get the list of job instances for a scheduled job definition.

Extension GA
az iot central scheduled-job show

Get details about a scheduled job by ID.

Extension GA
az iot central scheduled-job update

Update a scheduled job by ID.

Extension GA

az iot central scheduled-job create

Create a scheduled job by ID.

--schedule and --content can be inline json or file path.

az iot central scheduled-job create --app-id
                                    --content
                                    --group-id
                                    --id
                                    --schedule
                                    [--api-version {2022-06-30-preview, 2022-07-31}]
                                    [--batch]
                                    [--batch-type {number, percentage}]
                                    [--cancellation-threshold]
                                    [--cancellation-threshold-batch]
                                    [--cancellation-threshold-type {number, percentage}]
                                    [--central-api-uri]
                                    [--desc]
                                    [--job-name]
                                    [--token]

Examples

Create a schedule job with name

az iot central scheduled-job create --app-id {appid} --job-id {jobId} --group-id {groupId} --job-name {displayName} --schedule {jobScheduleJSONPatch} --content {jobDataJSONPath}

Create a scheduled job with name and batch configuration.

az iot central scheduled-job create --app-id {appid} --job-id {jobId} --group-id {groupId} --job-name {displayName} --schedule	{jobScheduleJSONPatch} --content {jobDataJSONPath} --batch {jobBatchValue} --batch-type {jobBatchType}

Create a scheduled job with name and cancellation threshold configuration with no batch.

az iot central scheduled-job create --app-id {appid} --job-id {jobId} --group-id {groupId} --job-name {displayName} --schedule	{jobScheduleJSONPatch} --content {jobDataJSONPath} --cancellation-threshold {jobCancellationThresholdValue} --cancellation-threshold-type {jobCancellationThresholdType} --description {jobDesc}

Required Parameters

--app-id -n

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--content -k

The job data definition. Provide path to JSON file or raw stringified JSON. The request body must contain array of JobData.

--group-id -g

The ID of the device group on which to execute the job.

--id --job-id

Unique identifier for the scheduled job.

--schedule

The schedule at which to execute the job. Provide path to JSON file or raw stringified JSON.

Optional Parameters

--api-version --av
Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.

accepted values: 2022-06-30-preview, 2022-07-31
default value: 2022-07-31
--batch -b

The number or percentage of devices on which batching is done.

--batch-type --bt

Specify if batching is done on a number of devices or a percentage of the total.

accepted values: number, percentage
default value: number
--cancellation-threshold --cth

The number or percentage of devices on which the cancellation threshold is applied.

--cancellation-threshold-batch --ctb

Whether the cancellation threshold applies per-batch or to the overall job.

default value: number
--cancellation-threshold-type --ctt

Specify if cancellation threshold applies for a number of devices or a percentage of the total.

accepted values: number, percentage
default value: number
--central-api-uri --central-dns-suffix

The IoT Central DNS suffix associated with your application.

default value: azureiotcentral.com
--desc --description

Detailed description of the job.

--job-name

Display name of the job.

--token

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot central scheduled-job delete

Delete an existing scheduled job by ID.

az iot central scheduled-job delete --app-id
                                    --id
                                    [--api-version {2022-06-30-preview, 2022-07-31}]
                                    [--central-api-uri]
                                    [--token]

Examples

Delete an existing scheduled job by ID

az iot central scheduled-job delete --app-id {appid} --id {scheduledJobId}

Required Parameters

--app-id -n

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--id --job-id

Unique identifier for the scheduled job.

Optional Parameters

--api-version --av
Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.

accepted values: 2022-06-30-preview, 2022-07-31
default value: 2022-07-31
--central-api-uri --central-dns-suffix

The IoT Central DNS suffix associated with your application.

default value: azureiotcentral.com
--token

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot central scheduled-job list

Get the list of scheduled job definitions in an application.

az iot central scheduled-job list --app-id
                                  [--api-version {2022-06-30-preview, 2022-07-31}]
                                  [--central-api-uri]
                                  [--token]

Examples

Get the list of scheduled job definitions in an application

az iot central scheduled-job list --app-id {appid}

Required Parameters

--app-id -n

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

Optional Parameters

--api-version --av
Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.

accepted values: 2022-06-30-preview, 2022-07-31
default value: 2022-07-31
--central-api-uri --central-dns-suffix

The IoT Central DNS suffix associated with your application.

default value: azureiotcentral.com
--token

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot central scheduled-job list-runs

Get the list of job instances for a scheduled job definition.

az iot central scheduled-job list-runs --app-id
                                       --id
                                       [--api-version {2022-06-30-preview, 2022-07-31}]
                                       [--central-api-uri]
                                       [--token]

Examples

Get the list of jobs instances for a scheduled job definition

az iot central scheduled-job list-runs --app-id {appid} --job-id {jobId}

Required Parameters

--app-id -n

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--id --job-id

Unique identifier for the scheduled job.

Optional Parameters

--api-version --av
Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.

accepted values: 2022-06-30-preview, 2022-07-31
default value: 2022-07-31
--central-api-uri --central-dns-suffix

The IoT Central DNS suffix associated with your application.

default value: azureiotcentral.com
--token

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot central scheduled-job show

Get details about a scheduled job by ID.

az iot central scheduled-job show --app-id
                                  --id
                                  [--api-version {2022-06-30-preview, 2022-07-31}]
                                  [--central-api-uri]
                                  [--token]

Examples

Get details about a scheduled job by ID

az iot central scheduled-job show --app-id {appid} --id {scheduledJobId}

Required Parameters

--app-id -n

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--id --job-id

Unique identifier for the scheduled job.

Optional Parameters

--api-version --av
Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.

accepted values: 2022-06-30-preview, 2022-07-31
default value: 2022-07-31
--central-api-uri --central-dns-suffix

The IoT Central DNS suffix associated with your application.

default value: azureiotcentral.com
--token

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot central scheduled-job update

Update a scheduled job by ID.

az iot central scheduled-job update --app-id
                                    --id
                                    [--api-version {2022-06-30-preview, 2022-07-31}]
                                    [--batch]
                                    [--batch-type {number, percentage}]
                                    [--cancellation-threshold]
                                    [--cancellation-threshold-batch]
                                    [--cancellation-threshold-type {number, percentage}]
                                    [--central-api-uri]
                                    [--content]
                                    [--desc]
                                    [--group-id]
                                    [--job-name]
                                    [--schedule]
                                    [--token]

Examples

Update a schedule job with name

az iot central scheduled-job update --app-id {appid} --job-id {jobId} --job-name {displayName}

Required Parameters

--app-id -n

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--id --job-id

Unique identifier for the scheduled job.

Optional Parameters

--api-version --av
Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

This command parameter has been deprecated and will be ignored.In the future release, we will only support IoT Central APIs from latest GA version.If any API is not GA yet, we will call latest preview version.

accepted values: 2022-06-30-preview, 2022-07-31
default value: 2022-07-31
--batch -b

The number or percentage of devices on which batching is done.

--batch-type --bt

Specify if batching is done on a number of devices or a percentage of the total.

accepted values: number, percentage
default value: number
--cancellation-threshold --cth

The number or percentage of devices on which the cancellation threshold is applied.

--cancellation-threshold-batch --ctb

Whether the cancellation threshold applies per-batch or to the overall job.

--cancellation-threshold-type --ctt

Specify if cancellation threshold applies for a number of devices or a percentage of the total.

accepted values: number, percentage
default value: number
--central-api-uri --central-dns-suffix

The IoT Central DNS suffix associated with your application.

default value: azureiotcentral.com
--content -k

The job data definition. Provide path to JSON file or raw stringified JSON. The request body must contain array of JobData.

--desc --description

Detailed description of the job.

--group-id -g

The ID of the device group on which to execute the job.

--job-name

Display name of the job.

--schedule

The schedule at which to execute the job. Provide path to JSON file or raw stringified JSON.

--token

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.