You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/iot-hub-howto-schedule-broadcast-jobs-dotnet.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,14 +66,16 @@ Use [ScheduleDeviceMethodAsync](/dotnet/api/microsoft.azure.devices.jobclient.sc
66
66
67
67
Use the [CloudToDeviceMethod](/dotnet/api/microsoft.azure.devices.cloudtodevicemethod.-ctor?#microsoft-azure-devices-cloudtodevicemethod-ctor(system-string-system-timespan-system-timespan)) object to specify the direct method name and device connection time-out values.
68
68
69
+
For example:
70
+
69
71
```csharp
70
72
// The CloudToDeviceMethod record specifies the direct method name and device connection time-out
This example schedules a job for a direct method named "LockDoor" on one device named "Device-1". One or more devices included in the scheduled job are contained second parameter as a query condition. For more information about query conditions, see [IoT Hub query language for device and module twins, jobs, and message routing](/azure/iot-hub/iot-hub-devguide-query-language).
78
+
This example schedules a job for a direct method named "LockDoor" on one device named "Device-1". The devices included in the scheduled job are contained second parameter as a query condition. For more information about query conditions, see [IoT Hub query language for device and module twins, jobs, and message routing](/azure/iot-hub/iot-hub-devguide-query-language).
77
79
78
80
```csharp
79
81
stringmethodJobId=Guid.NewGuid().ToString(); // a unique job ID
@@ -87,9 +89,9 @@ JobResponse result = await jobClient.ScheduleDeviceMethodAsync(methodJobId,
87
89
88
90
### Schedule a device twin update job
89
91
90
-
Use [ScheduleTwinUpdateAsync](/dotnet/api/microsoft.azure.devices.jobclient.scheduledevicemethodasync) to schedule a new device twin desired properties and tags update job to run on one or more devices.
92
+
Use [ScheduleTwinUpdateAsync](/dotnet/api/microsoft.azure.devices.jobclient.scheduletwinupdateasync) to schedule a new device twin desired properties and tags update job to run on one or more devices.
91
93
92
-
First, create and populate a device `Twin` object for the update. For example:
94
+
First, create and populate a device [Twin](/dotnet/api/microsoft.azure.devices.shared.twin) object for the update. For example:
Copy file name to clipboardExpand all lines: includes/iot-hub-howto-schedule-broadcast-jobs-java.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,8 +102,6 @@ try {
102
102
103
103
Use [scheduleUpdateTwin](/java/api/com.microsoft.azure.sdk.iot.service.jobs.jobclient?#com-microsoft-azure-sdk-iot-service-jobs-jobclient-scheduleupdatetwin(java-lang-string-java-lang-string-com-microsoft-azure-sdk-iot-service-devicetwin-devicetwindevice-java-util-date-long)) to schedule a job to run a device twin update on one or multiple devices.
104
104
105
-
This example method schedules a device twin update job for a specific job ID.
106
-
107
105
First, prepare a [DeviceTwinDevice](/java/api/com.microsoft.azure.sdk.iot.service.devicetwin.devicetwindevice) record for the device twin update. For example:
0 commit comments