Creating embedded jobs

The purpose of the following scenario is to show how to create an embedded job in the context of an example.

Jobs can either be an embedded job, or they can reference a job definition. For information about how to create a job definition from the Dynamic Workload Console, see Managing job definitions.

David is an IBM® Workload Scheduler user who needs to upgrade the Java version on the existing backup server named BK_server. To automate the process, David decides to create a job stream that contains an embedded job. David prefers to create an embedded job instead of referencing a job definition because he only needs to use the job in that job stream.

To create an embedded job named UPGRADE_JAVA_VERSION inside the UPGRADE_JAVA job stream, perform the following steps:
  1. Create a job stream named UPGRADE_JAVA and define general information about it.
    1. From the Blocks tab in the Graphical Designer page, drag a job stream and drop it into the workspace.
    2. In General information, in Folder, select a folder.
    3. In General information, in Workstation, select the existing workstation BK_server.
    4. In General information, in Name, type UPGRADE_JAVA.
  2. Create an embedded job named UPGRADE_JAVA_VERSION into the UPGRADE_JAVA job stream.
    1. From the Blocks tab in the Graphical Designer page, drag an executable job and drop it into the UPGRADE_JAVA job stream.
  3. Define information about the UPGRADE_JAVA_VERSION embedded job:
    1. In General information, in Workstation, select BK_server.
    2. In General information, in Name, type UPGRADE_JAVA_VERSION.
    3. In General information, in Description, type Java upgrade to version 11.
    4. In Task, in Command text or script name, type apt install --only-upgrade openjdk-11-jre-headless -y.
  4. Click Deploy to deploy the workspace.
You created an embedded job to upgrade the Java version on the backup server named BK_server.