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 9-3 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. |
Sample commands to perform Scheduler Operations
- Trigger/Execute
Execute batch “batch1”:
Syntax: ./EICSchedulerService.sh -o 1 –u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -x < External Unique Id > -b < Object Name > -t < Object Type>
Example: ./EICSchedulerService.sh -o 1 -u scheduser -w WS1 -c ofsauser -s secret -x batch1_1001 -b batch1 -t rests
Execute batch “batch1” with Dynamic Parameter list
Syntax: ./EICSchedulerService.sh -o 1 –u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -x < External Unique Id > -b < Object Name > -t < Object Type> -v <Dynamic Runtime parameter list>
Example: ./EICSchedulerService.sh -o 1 -u mmgadmin -w CS -c ofsauser -s secret -x 232 -b BatchModel -t rest -v '{"batchParams":{"$FICMISDATE$":"2021-11-30","$BATCHRUNID$":"BATCHRUNID","param_1":"qwert","param_2":"abcde"},"taskRuntimeParams":{"Task1":{"p1":"11102","p2":"22202","abc":"123342","extraP":"wert2y"},"Task2":{"abc":"1233","p3":"3333","extP2":"0983"}}}'Note:
The Task/Batch parameters should be the actual parameter key.Execute batch “batch1” with “task1” and “task2” included:
Syntax: ./EICSchedulerService.sh -o 1 –u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -x < External Unique Id > -b < Object Name > -t < Object Type> -I < Included Jobs with comma separated values>
Example: ./EICSchedulerService.sh -o 1 -u scheduser -w WS1 -c ofsauser -s secret -x batch1_1001 -b batch1 -t rest -i task1,task2
Execute batch “batch1” with “task1” as excluded and “task2” as held:
Syntax:
./EICSchedulerService.sh -o 1 –u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -x < External Unique Id > -b < Object Name > -t < Object Type> -e < Excluded Jobs> -h < Held Jobs>
Example:
./EICSchedulerService.sh -o 1 -u scheduser -w WS1 -c ofsauser -s secret -x batch1_1001 -b batch1 -t rest -e task1 -h task2
- Status
Get status of execution having runid = MMG_R1_2022-09-07_1662557327886_1:
Syntax:
./EICSchedulerService.sh -o 2–u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -r < Batch Execution Id>
Example:
./EICSchedulerService.sh -o 2 -u scheduser -w WS1 -c ofsauser -s secret -r MMG_R1_2022-09-07_1662557327886_1
- Re-Start
Restart execution for batch “MMG_R1” having runid = MMG_R1_2022-09-07_1662557327886_1: Syntax: ./EICSchedulerService.sh -o 3–u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -b < Object Name> -r < Batch Execution Id>
Example:
./EICSchedulerService.sh -o 3 -u scheduser -w WS1 -c ofsauser -s secret -b MMG_R1 -r MMG_R1_2022-09-07_1662557327886_1
- Re-Run
Rerun execution for batch “batch1” having runid = batch1 -r batch1_2022-09-01_1662011065557_1:
Syntax:
./EICSchedulerService.sh -o 4–u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -x < External Unique Id > -b < Object Name> -r < Batch Execution Id>
Example:
./EICSchedulerService.sh -o 4 -u scheduser -w WS1 -c ofsauser -s secret -x batch1_1002 -b batch1 -r batch1_2022-09-01_1662011065557_1
- Interrupt
Interrupt execution for batch “batch1” having runid = batch1_2022-09-07_1662530601924_1:
Syntax:
./EICSchedulerService.sh -o 5–u < ofs_remote_user > -w < Workspace Id > -c < Client Id for authentication > -s < Client Secret for authentication > -b < Object Name> -r < Batch Execution Id>
Example:
./EICSchedulerService.sh -o 5 -u scheduser -w WS1 -c ofsauser -s secret -b batch1 -r batch1_2022-09-07_1662530601924_1
Note:
- On successful request for execute/rerun, the batchrunid corresponding to external unique id will be stored in the AAICL_SS_EXT_BATCH_RUN_ID_MAPPING table.
- External Unique ID is required only in case of execute/rerun request.