Get job schedules
Returns configuration information about scheduled jobs on the peer, including schedule name, comments, process name, peer name, schedule start and stop information, and frequency. You can retrieve all schedules, a schedule by module name, or include request filters to retrieve schedules matching a pattern.
This topic includes the following sections:
Request
HTTP method: GET
Request URL: Use one of the following URLs.
To get all schedules:
https://<hostname>:<port>/baocdp/rest/schedule
You can specify patterns to retrieve specific schedules.
To get a schedule by name:
https://<hostname>:<port>/baocdp/rest/schedule/<module_name>
In this URL, <module_name> represents the name of the module associated with schedules to retrieve.
You can also specify a pattern to retrieve the schedule with a specified name. For example,https://<hostname>:<port>/baocdp/rest/schedule/<module_name>?scheduleName=<name of the schedule>
Header: See HTTP request and response headers for header information, such as required authentication token.
Request parameters
Use the following parameters to filter the request.
Parameter | Type | Required | Description | Values | Default value |
---|---|---|---|---|---|
pattern | String | No | Pattern of the schedules to get Use one of the following parameters with pattern:
Patterns must be expressed as Java Regular Expressions. PCRE patterns are not supported. If you do not provide a pattern, all schedules are returned. | User-provided value | NA |
name | String | No | Name of schedule Use this parameter with the pattern parameter. name is case-sensitive in the URL. | User-provided value | NA |
processName | String | No | Name of process associated with the schedule Use this parameter with the pattern parameter. processName is case-sensitive in the URL. | User-provided value | NA |
Example URLs
The following URL specifies the module associated with the schedule to retrieve.
https://<clm-pun-123456>:<58080>/baocdp/rest/schedule/AutoPilot-AD-Utilities
The following URL uses the pattern parameter to specify the name of the schedule to retrieve or the name of the process associated with the schedule to retrieve.
https://<hostname>:<port>/baocdp/rest/schedule?pattern=ScheduleX&matchon=name
https://<hostname>:<port>/baocdp/rest/schedule?pattern=ProcessA&matchon=processName
Request body properties
This call does not require a request body.
Response
If successful, this method returns details about job schedules on the grid and their configuration information. If you do not include request parameters, the method returns details about all job schedules.
Response body properties
Property | Description |
---|---|
name | Schedule name |
comment | Schedule description |
peerName | Name of the peer on which the schedule runs. |
processName | Name of the process that runs |
startSchedule | When the schedule starts running |
frequency | Frequency at which the schedule runs It will be one of the following:
|
stopSchedule | When the schedule stops running It will be one of the following:
|
Example response JSON for Get Job Schedules
[
{
"name": "Read files",
"comment": "",
"peerName": "any",
"processName": ":AutoPilot-AD-Utilities:Terminal:File:Read",
"frequency": {
"scheduleFrequency": "Daily"
},
"stopSchedule": {
"runForever": "false",
"stopTime": "1506142528",
"afterRun": 0
}
},
{
"name": "Get activated modules",
"comment": "",
"peerName": "any",
"processName": ":AutoPilot-OA-BAOGridManagement:Module:Get All Activated Modules",
"frequency": {
"scheduleFrequency": "Daily"
},
"stopSchedule": {
"runForever": "false",
"afterRun": 25
}
},
{
"name": "Get adapters",
"comment": "",
"peerName": "any",
"processName": ":AutoPilot-OA-BAOGridManagement:adapter:Get All Adapters",
"frequency": {
"runEvery": "7200000"
},
"stopSchedule": {
"runForever": "true",
"afterRun": 0
}
}
]
Status codes and messages
For more details about HTTP response codes, see HTTP response codes.
HTTP code | Message | Description |
---|---|---|
200 | OK | Request succeeded |
401 | Unauthorized | |
403 | Forbidden Client is not permitted to access the resource. | |
500 | Internal server error |
Comments
Log in or register to comment.