title | description | ms.service | services | author | ms.author | ms.date | ms.topic | manager |
---|---|---|---|---|---|---|---|---|
Create and run jobs in your Azure IoT Central application | Microsoft Docs |
Azure IoT Central jobs allow for bulk device management capabilities, such as updating a device property, setting, or executing a command. |
iot-central |
iot-central |
sarahhubbard |
sahubbar |
09/15/2018 |
conceptual |
peterpr |
You can use Microsoft Azure IoT Central to manage your connected devices at scale using jobs. The jobs functionality enables you to perform bulk updates to device properties, settings, and commands. This article will walk you through how to get started using jobs in your own application.
This section shows you how to create and run a job. Each step goes through an example that demonstrates how to run a job for refrigerated vending machine devices that need to have their fan speed increased.
-
Navigate to Jobs from the navigation pane.
-
Click + New in order to start creating a new job.
-
Enter a name and description that help you identify the job you are creating.
-
Select the device set you want your job to be applied to. After selecting the device set, you'll see the right-hand side populate with the devices within the selected device set. If you select a broken device set, no devices will display and you will see a message explaining that your device set is broken.
-
Next, choose the type of job that will be defined (a setting, property, or command). Click + next to the type of job selected and add your desired operations.
-
On the right-hand side, pick and choose the devices you’d like to run the job on. By clicking the top check box, all devices are selected in the entire device set. By clicking the check box near Name, all devices on the current page are selected.
-
Once your desired devices have been selected, choose Run. The job will now appear on your main Jobs page. On this view, you are able to see your currently running job and the history of any previously run jobs. Your running job will always show up at the top of the list.
[!NOTE] You will be able to view the history of your previously run jobs for up to 30 days.
-
To get an overview of your job, click on the job name you wish to view from your list. This overview contains the job details, devices, and device statuses.
If you would like to stop a job that is currently running, click on the name of the running job that you would like to stop. Choose the Stop button on the panel. You’ll see the job status has changed to reflect that the job has been stopped.
If you would like to run a job that is currently stopped, click on the name of the stopped job that you would like to run. Choose the Run button on the panel. You'll see that the job status has changed to reflect that the job is now running again.
Once a job has been created, the Status column will update with the latest status message of the job. The status messages mean the following:
Status message | Status meaning |
---|---|
Completed | This job has been executed on all devices. |
Failed | This job has failed and not fully executed on devices. |
Pending | This job has not yet begun executing on devices. |
Running | This job is currently executing on devices. |
Stopped | This job has been manually stopped by a user. |
The status message is followed by an overview of the devices within the job. These device statuses mean the following:
Status message | Status meaning |
---|---|
Succeeded | The number of devices which the job has successfully executed on. |
Failed | The number of devices which the job has failed to execute on. |
In order to view the status of each device in the job, click on the job name. Here you'll see the details of the job and all of the devices that were a part of this specific job. Next to each device name, you'll see one of the following status messages:
Status message | Status meaning |
---|---|
Completed | The job has been executed on this device. |
Failed | The job has failed to execute on this device. The accompanying error message will show more information. |
Pending | The job has not yet executed on this device. |
Note
If a device has been deleted, you won't be able to select the device and it will display as deleted with the device ID.
Now that you have learned how to create jobs in your Azure IoT Central application, here are some next steps: