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.

ParameterTypeRequiredDescriptionValuesDefault value
patternStringNo 

Pattern of the schedules to get

Use one of the following parameters with pattern:

  • name
  • processName

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 valueNA
nameStringNo

Name of schedule

Use this parameter with the pattern parameter.

name is case-sensitive in the URL.

User-provided valueNA
processNameStringNo

Name of process associated with the schedule

Use this parameter with the pattern parameter.

processName is case-sensitive in the URL.

User-provided valueNA

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

PropertyDescription
nameSchedule name
commentSchedule description
peerNameName of the peer on which the schedule runs.
processNameName of the process that runs
startScheduleWhen the schedule starts running
frequency

Frequency at which the schedule runs

It will be one of the following:

  • runEvery: The time iteration for schedule runs.
  • scheduleFrequency: The frequency of schedule runs.
stopSchedule

When the schedule stops running

It will be one of the following:

  • runForever: Specifies whether the schedule runs forever.
  • stopTime: Specifies the time to stop running the schedule.
  • afterRun: Specifies the time to stop running the schedule.

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 codeMessageDescription
200OKRequest succeeded
401 Unauthorized
403

Forbidden

Client is not permitted to access the resource.

500
Internal server error

Related topics

HTTP request and response headers

Format of API examples

Add/update job schedule

Run job schedules

Delete job schedules

Was this page helpful? Yes No Submitting... Thank you

Comments