Skip to content

Commit 6559856

Browse files
committed
changes after review
1 parent c18913b commit 6559856

File tree

1 file changed

+15
-26
lines changed

1 file changed

+15
-26
lines changed

articles/iot-central/core/howto-manage-jobs-with-rest-api.md

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ The IoT Central REST API lets you develop client applications that integrate wit
2121

2222
Scheduled jobs are created to run at a future time. You can set a start date and time for a scheduled job to run one-time, daily, or weekly. Non-scheduled jobs run only one-time.
2323

24-
> [!IMPORTANT]
25-
> The jobs API is currently in preview. All The REST API calls described in this article should include `?api-version=2022-07-31`.
26-
2724
This article describes how to use the `/jobs/{job_id}` API to control devices in bulk. You can also control devices individually.
2825

2926
Every IoT Central REST API call requires an authorization header. To learn more, see [How to authenticate and authorize IoT Central REST API calls](howto-authorize-rest-api.md).
@@ -349,27 +346,11 @@ PUT https://{your app subdomain}.azureiotcentral.com/api/jobs/job-006/rerun/reru
349346

350347
The payload for a scheduled job is similar to a standard job but includes the following additional fields:
351348

352-
| Field |Type| Description |
353-
| ----- | --------| ----------- |
354-
schedule|JobSchedule| The schedule at which to execute the job.
355-
356-
### JobSchedule
357-
358-
The schedule definition of job.
359-
360-
| Field |Type| Description |
361-
| ----- | --------| ----------- |
362-
end| `JobScheduleEnd`, `DateJobScheduleEnd`, `OccurrencesJobScheduleEnd`|The specification of when to end the scheduled job.
363-
recurrence | `JobRecurrence`| The recurrence of the scheduled job. If not provided, the job will run once at the specified start time.
364-
start| string |The start time for the scheduled job.
365-
366-
### JobRecurrence
367-
368-
| Field |Type| Description |
369-
| ----- | --------| ----------- |
370-
daily| string |The job will run once daily.
371-
monthly| string| The job will run once every month.
372-
weekly| string| The job will run once every week.
349+
| Field | Description |
350+
| ----- | ----------- |
351+
schedule/start |The start date and time for the job in ISO 8601 format
352+
schedule/recurrence| One of `daily`, `monthly`, `yearly`
353+
schedule/end| An optional field that either specifies the number of occurrences for the job or an end date in ISO 8601 format
373354

374355
```http
375356
PUT https://{your app subdomain}.azureiotcentral.com/api/scheduledJobs/scheduled-Job-001?api-version=2022-07-31
@@ -391,7 +372,11 @@ The following example shows a request body that creates a scheduled job.
391372
],
392373
"schedule": {
393374
"start": "2022-10-24T22:29:01Z",
394-
"recurrence": "daily"
375+
"recurrence": "daily",
376+
"end": {
377+
"type": "date",
378+
"date": "2022-12-30"
379+
}
395380
}
396381
}
397382
```
@@ -414,7 +399,11 @@ The response to this request looks like the following example:
414399
],
415400
"schedule": {
416401
"start": "2022-10-24T22:29:01Z",
417-
"recurrence": "daily"
402+
"recurrence": "daily",
403+
"end": {
404+
"type": "date",
405+
"date": "2022-12-30"
406+
}
418407
},
419408
"enabled": false,
420409
"completed": false,

0 commit comments

Comments
 (0)