Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

JobScheduler and Agent

  • The

...

  • architecture

...

  • for JobScheduler and Agents forces some prerequisites.
  • Make sure that

...

  • the JobScheduler can communicate with the Agent JobScheduler and vice versa.

JobScheduler Agent configuration

For this, edit the ./config/scheduler.xml of the Main JobScheduler:

Code Block
languagexml
  ...  
  <security ignore_unknown_hosts="yes">
      ...
      <allowed_host host="[host or IP of the Agent JobScheduler]" level="all"/>
  </security>
  ...

and edit the ./config/scheduler.xml of the Agent JobSchedulerJobScheduler Agent :

Code Block
languagexml
  ...  
  <security ignore_unknown_hosts="yes">
      ...
      <allowed_host host="[host or IP of the Main JobScheduler]" level="all"/>
  </security>
  ...  

Process Class configuration

Now you need a Process Class and a Job in the HotFolder Hot Folder (./config/live) of the Main JobScheduler to test the AgentJobScheduler Agent.

In our example, let the agentJobScheduler Agent's hostname be wilma and its port 4410:

  • open JOE - Job JobScheduler Object Editor (JobScheduler Object Editor)
    Use the shortcut Ctrl-D to open the Hot Folder in JOE. You reach also open this dialog from the menu File->Open Hot Folder or with the red folder icon.
    The Hot Folder should be already selected, otherwise please navigate to ./config/live.
  • Create the process class.
    Click on Process Class in the left tree of the JobScheduler elements.
    With New Process Class on the right hand side you create a process class which is stored with Apply Process Class after you have enter having entered the name myAgent and the agent, the JobScheduler Agent's host and port will be wilma:4410.
    A file ./config/live/myAgent.process_class.xml is created with the following content:
     
Code Block
languagexml
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
 <process_class max_processes="30" remote_scheduler="wilma:4410"/>

 

Job configuration

  • Create the job which that uses the above process class.
  • Click on Jobs in the left tree of the JobScheduler elements.
  • With New Standalone Jobs on the right hand side you create a new job in the list of the jobs and in the left tree. Select it to open an empty job configuration element.


Enter in the field Job Name e.g. myAgentJob and in the Source Code text area the lines:

Code Block
languagebash
  #! /bin/sh
  # returns the hostname of the agent
  hostname

...

  • In order to have this job

...

  • executed on the

...

  • JobScheduler Agent, the job

...

  • should be assigned

...

  • the above process class.

...

  • Assign the field Process Class

...

  •  the above myAgent process class.
  • You store this configuration with the shortcut Crtl-S or with the File->Save function.


A file ./config/live/myAgentJob.job.xml is created with the content:

Code Block
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
 <job process_class="myAgent">
     <script language="shell">
         <![CDATA[
 #! /bin/sh
 # returns the hostname of the agent
 hostname
         ]]>
     </script>
     <run_time/>
 </job> 
  • The value in the process_class attribute of the job element

...

  • should be assigned a relative path or absolute path to an existing process class.

      ...

        • An absolute path starts at the ./config/live folder.
      • In the above

      ...

      • example 
        • a relative path is used and the job finds the process_class

      ...

        •  in the same folder.

      ...

        • you

      ...

        • could use the absolute path <job process_clash1. "/myAgent">

      ...

        • as well.
      • For example, if the job is stored in ./config/live/myProject/myAgentJob.job.xml then you can use <job process_class"/myAgent"> or <job process_class="../myAgent">.
      • Start the job myAgentJob in the How to configure JOC - Configurationan overview and look into check the task's log.
        You will  You should see a line like this:
         
      Code Block
       2011-10-10 15:26:47.237 [info]   wilma