A job must be deployed to the Orchestrator Server before it can be run. Deployment to the server is done in either of the following ways:
In themenu, click .
For additional deployment details, see
Walkthrough: Deploy a Sample Job.
From the CLI, you can deploy a component file (.job, .jdl, .sar) or refer to a directory containing job components.
.job files are Java jar archives containing .jdl, .policy, .sched and any other files required by your job. A .sar file is a Java jar archive for containing multiple jobs and policies.
To deploy a .job file from the command line, enter the following command:
>zosadmin deploy <myjob>.job
To deploy a job from a directory where the directory /jobs/myjob contains .jdl, .policy, .sched, and any other files required by your job, enter the following command:
>zosadmin deploy /jobs/myjob
Deploying from a directory is useful if you want to explode an existing job or .sar file and redeploy the job components without putting the job back together as a .job or .sar file.
Copy the job file into the “hot” deploy directory by entering the following command:
>cp <install dir>/examples/whoami.job <install dir>/deploy
As part of an iterative process, you can re-deploy a job from a file or a directory again after specified local changes are made to the job file. You can also undeploy a job out of the system if you are done with it. Use zosadmin redeploy and zosadmin undeploy to re-deploy and undeploy jobs, respectively.
A typical approach to designing, deploying, and running a job is as follows:
Identify and outline the job tasks you want the Orchestrator Server to perform.
Use the preconfigured JDL files for specific tasks listed in Section A.0, Orchestrator Job Classes and JDL Syntax.
To configure jobs, edit the JDL file with an external text editor.
Repackage the job as a .jar file.
Run the ZOS administration tool to redeploy the packaged job into the Orchestrator Server.
Run the job using the zos command line tool.
Monitor the results of the job in the ZENworks Orchestrator Console.
Another method to deploy jobs is to edit JDL files through the Orchestrator Console. The console has a text editor that enables you to make changes directly in the JDL file as it is stored on the server ready to deploy. After changes are made and the file is saved using the Orchestrator Console, you simply re-run the job without redeploying it. The procedure is useful when you need to fix typos in the JDL file or have minor changes to make in the job functionality.
NOTE:Redeploying a job overwrites any job that has been previously saved on the Orchestrator Server. The Orchestrator console has amenu option if you want to preserve JDL modifications you made using ZOC.