none
How To Schedule Twin Update On Multiple Modules RRS feed

  • Question

  • We can schedule jobs on multiple devices, to update twins and invoke methods. Refer iot-hub-devguide-jobs

    My question is that, what is the way to schedule jobs on multiple modules (iot edge or iot hub).

    Sunday, March 24, 2019 2:28 PM

Answers

  • Hi Ravindra,

    I gave it a try using the REST API and here is an example on how to create a job to update a module twin (use Query Language and REST API as reference)

    {
        "jobId": "001",
        "type": "scheduleUpdateTwin",
        "updateTwin": {
    	  "properties": {
    	   "desired": {
    	    "testingUpdate": "succeeded",
    	    "version": "7"
    	   }
    	  },
    	 "etag":"*"
    	 },                
        "queryCondition": "FROM devices.modules WHERE moduleId = 'module1'",
        "maxExecutionTimeInSeconds": 60
    }

    Thanks!

    Wednesday, March 27, 2019 11:59 AM
    Moderator