External Interface Component Scheduler Service
Use the EICSchedulerService.sh utility located in the
<installed path> mmg-home/bin
folder to perform basic scheduler
operations.
Prerequisites:
- Ensure public and private keys are present in the conf folder and the
corresponding path is present in
application.properties
ofmmg UI service
. - You should be aware of the clientId/secret which will be used for basic
authentication. (Currently, these values are stored in
application.properties
astoken.clientid
and token.secret).
Table 12-5 List of possible flagged arguments to be passed while executing EICSchedulerService.sh
Flag | Description | Comments |
---|---|---|
-o | Operation Type: The operation the user wants to perform. |
A mandatory argument for all type of requests. Possible Values are: 1 – To trigger an object 2 – To get the current status of a run. 3 – To re-start an execution. 4 – To re-run an execution. 5 – To interrupt an execution. |
-u | ofs_remote_user | A mandatory argument for all the type of requests |
-w | Workspace Id | A mandatory argument for all the type of requests |
-c | Client Id for authentication |
A mandatory argument for all the type of requests Currently, in mmg-ui application.properties the parameter token.clientid is set to ofsauser |
-s | Client Secret for authentication |
A mandatory argument for all the type of requests Currently, in mmg-ui application.properties the parameter token.secret is set to secret |
-b | Object Name | Batch or Batch Group Name. |
-t | Object Type | For Batch, it is set to rest and for Batch Group, it is set to group. |
-r | Batch Execution Id | Execution ID of the Batch or Batch Group. |
-x | External Unique Id | The unique ID for every execution. Mandatory for execute and rerun operations. |
-i | Included Jobs | In case of trigger, included jobs can be provided as comma separated values using this flag. |
-e | Excluded Jobs | In case of trigger, excluded jobs can be provided as comma separated values using this flag. |
-h | Held Jobs | In case of trigger, held jobs can be provided as comma separated values using this flag. |
-v | Dynamic parameter list | This is an optional parameter to support passing of dynamic runtime parameters for Batch/Task. |
Table 12-6 List of possible exit codes returned by “EICSchedulerService.sh
API | Syntax | Description | Status Code | Code Description |
---|---|---|---|---|
Trigger |
|
To execute a batch or a batch group | -4 | Invalid arguments passed in request/not enough params in Request body |
-5 | Invalid Request Headers | |||
-9 | Duplicate External Unique Id | |||
-3 | Batch or Batchgroup does not exist. | |||
-6 | No executable job is present. Batch with no task. | |||
0 | Batch or BatchGroup execution is success | |||
-1 | Batch or BatchGroup execution is failed. | |||
Status |
|
To check the status | -3 | Batch or Batchgroup Run Id does not exist. |
-4 | Invalid arguments passed in request/not enough params in Request body | |||
-5 | Invalid Request Headers | |||
0 | Batch or batchgroup status is success | |||
-1 | Batch or batchgroup status is failed or API failed internally to return valid response status code. | |||
-2 | Batch or batchgroup status is interrupted. | |||
1 | Batch or batchgroup status is not started. | |||
2 | Batch or batchgroup status is ongoing. | |||
3 | Batch or batchgroup status is aborted. | |||
4 | Batch or batchgroup status is excluded | |||
5 | Batch or batchgroup status is held. | |||
Restart |
|
To restart failed execution | -4 | Invalid arguments passed in request/not enough params in Request body |
-5 | Invalid Request Headers | |||
-3 | Batch or Batchgroup Run Id does not exist. | |||
-6 | No executable job is present. Batch with no task. | |||
0 | Batch or BatchGroup restart is success | |||
-1 | Batch or BatchGroup restart is failed. | |||
Rerun |
|
To rerun the batch execution | -4 | Invalid arguments passed in request/not enough params in Request body |
-5 | Invalid Request Headers | |||
-3 | Batch or BatchgroupId or Run Id does not exist. | |||
0 | Batch or BatchGroup rerun is success | |||
-1 | Batch or BatchGroup rerun is failed. | |||
-9 | Duplicate External Unique Id | |||
Interrupt |
|
To Interrupt the ongoing execution | -3 | Batch or Batchgroup Run Id does not exist. |
-4 | Invalid arguments passed in request/not enough params in Request body | |||
-5 | Invalid Request Headers | |||
0 | Batch or BatchGroup interrupt is success | |||
-1 | Batch or BatchGroup interrupt is failed | |||
-7 | Batch or BatchGroup status is not ongoing or already interrupted. | |||
Note:
|