Skip to content

Commit 4dd354b

Browse files
authored
Merge pull request #292847 from gsteve88/update-howto-schedule-broadcast-jobs
Update how to schedule and broadcast jobs article
2 parents 2997610 + 2e910d4 commit 4dd354b

11 files changed

+768
-1443
lines changed

articles/iot-hub/.openpublishing.redirection.iot-hub.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,26 @@
15891589
"source_path_from_root": "/articles/iot-hub/module-twins-node.md",
15901590
"redirect_url": "/azure/iot-hub/how-to-module-twins",
15911591
"redirect_document_id": false
1592+
},
1593+
{
1594+
"source_path_from_root": "/articles/iot-hub/schedule-jobs-dotnet.md",
1595+
"redirect_url": "/azure/iot-hub/howto-schedule-broadcast-jobs",
1596+
"redirect_document_id": false
1597+
},
1598+
{
1599+
"source_path_from_root": "/articles/iot-hub/schedule-jobs-java.md",
1600+
"redirect_url": "/azure/iot-hub/howto-schedule-broadcast-jobs",
1601+
"redirect_document_id": false
1602+
},
1603+
{
1604+
"source_path_from_root": "/articles/iot-hub/schedule-jobs-python.md",
1605+
"redirect_url": "/azure/iot-hub/howto-schedule-broadcast-jobs",
1606+
"redirect_document_id": false
1607+
},
1608+
{
1609+
"source_path_from_root": "/articles/iot-hub/schedule-jobs-node.md",
1610+
"redirect_url": "/azure/iot-hub/howto-schedule-broadcast-jobs",
1611+
"redirect_document_id": false
15921612
}
15931613
]
15941614
}

articles/iot-hub/TOC.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,8 @@
299299
displayName: device management, status updates, device maintenance windows
300300
href: how-to-device-management.md
301301
- name: Schedule and broadcast jobs
302-
items:
303-
- name: .NET
304-
displayName: jobs, csharp, C#
305-
href: schedule-jobs-dotnet.md
306-
- name: Python
307-
displayName: jobs
308-
href: schedule-jobs-python.md
309-
- name: Node.js
310-
displayName: jobs
311-
href: schedule-jobs-node.md
312-
- name: Java
313-
displayName: jobs
314-
href: schedule-jobs-java.md
302+
displayName: schedule jobs
303+
href: how-to-schedule-broadcast-jobs.md
315304
- name: Query Avro data from a hub route
316305
displayName: Azure Data Lake, U-SQL
317306
href: iot-hub-query-avro-data.md
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Use jobs to schedule tasks for groups of devices
3+
titleSuffix: Azure IoT Hub
4+
description: How to use the service SDK to schedule a job that invokes a device direct method and updates desired device twin properties.
5+
author: kgremban
6+
ms.author: kgremban
7+
manager: lizross
8+
ms.service: azure-iot-hub
9+
ms.devlang: csharp
10+
ms.topic: how-to
11+
ms.date: 1/15/2025
12+
zone_pivot_groups: iot-hub-howto-c2d-1
13+
---
14+
15+
# How to schedule and broadcast jobs
16+
17+
This article shows you how to create back-end app code to schedule and broadcast jobs.
18+
19+
Use Azure IoT Hub to schedule and track jobs that update up to millions of devices for these operations:
20+
21+
* Invoke direct methods
22+
* Updated device twins
23+
24+
A job wraps one of these actions and tracks the execution against a set of devices that is defined by a device twin query. For example, a back-end app can use a job to invoke a direct method on 10,000 devices that reboots the devices. You specify the set of devices with a device twin query and schedule the job to run at a future time. The job monitors progress as each of the devices receives and executes the reboot direct method.
25+
26+
To learn more about each of these capabilities, see:
27+
28+
* Device twin and properties: [Get started with device twins](device-twins-dotnet.md) and [Understand and use device twins in IoT Hub](iot-hub-devguide-device-twins.md)
29+
* Direct methods: [IoT Hub developer guide - direct methods](iot-hub-devguide-direct-methods.md)
30+
31+
[!INCLUDE [iot-hub-basic](../../includes/iot-hub-basic-whole.md)]
32+
33+
> [!NOTE]
34+
> This article is meant to complement [Azure IoT SDKs](iot-hub-devguide-sdks.md) samples that are referenced from within this article. You can use SDK tools to build both device and back-end applications.
35+
36+
## Prerequisites
37+
38+
* An IoT hub
39+
40+
* A registered device
41+
42+
* If your application uses the MQTT protocol, make sure that port 8883 is open in your firewall. The MQTT protocol communicates over port 8883. This port may be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](../iot/iot-mqtt-connect-to-iot-hub.md#connecting-to-iot-hub).
43+
44+
:::zone pivot="programming-language-csharp"
45+
46+
[!INCLUDE [iot-hub-howto-schedule-broadcast-jobs-dotnet](../../includes/iot-hub-howto-schedule-broadcast-jobs-dotnet.md)]
47+
48+
:::zone-end
49+
50+
:::zone pivot="programming-language-java"
51+
52+
[!INCLUDE [iot-hub-howto-schedule-broadcast-jobs-java](../../includes/iot-hub-howto-schedule-broadcast-jobs-java.md)]
53+
54+
:::zone-end
55+
56+
:::zone pivot="programming-language-python"
57+
58+
[!INCLUDE [iot-hub-howto-schedule-broadcast-jobs-python](../../includes/iot-hub-howto-schedule-broadcast-jobs-python.md)]
59+
60+
:::zone-end
61+
62+
:::zone pivot="programming-language-node"
63+
64+
[!INCLUDE [iot-hub-howto-schedule-broadcast-jobs-node](../../includes/iot-hub-howto-schedule-broadcast-jobs-node.md)]
65+
66+
:::zone-end

0 commit comments

Comments
 (0)