Azure IoT Development Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

In this example, we looked at a job updating the device twin information, and we can follow up the job for its status to find out whether the job was completed or failed. In this case, instead of having single API calls, a job can be created to execute on multiple IoT devices. The job client object provides the jobs available with the IoT Hub using the connection to it. Once we locate the job using its unique ID, we can retrieve the status for it.

The code snippet mentioned in the How to do it... section uses the temperature properties and updates the data. The job is scheduled to start execution immediately with a 10-second execution timeout set.