You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

ARTICLE IN PROGRESS

 

 

Running multiple instances of JobScheduler Universal Agent

  • Multiple instances of the JobScheduler Agent on the same computer can be operated, e.g. for different user accounts that jobs should be executed for.
  • Any number of Agent instances can be started from the same installation, however, different ports have to be used that the Agent is listening to for requests of a JobScheduler Master.
  • Create an instance startscript for each JobScheduler Agent instance.
    • You find a template jobscheduler_agent_instance.(sh|cmd)-example for an instance script in the ./bin directory of the JobScheduler Agent installation since release 1.10.2.
    • For older releases you can download the templates ...
    • Copy this template to jobscheduler_agent_<port>.(sh|cmd) where <port> is the port that the Agent is listening to.
  • Configure the instance script with a text editor and set ...
    • the environment variable SCHEDULER_HTTP_PORT particularly
    • other environment variables as desired
  • Now you can start and stop etc. the JobScheduler Agent with the instance script where you no longer have to use command line options because the command line options are specified by the environment variables.
  • On Unix you can use the instance script as init script in /etc/init.d.

Create and configure the JobScheduler Universal Agent instance on Unix

  • We assume that the JobScheduler Agent instance listen for example to port 4445

create instance script for an Agent with port 4445
> cp ./bin/jobscheduler_agent_instance.sh-example ./bin/jobscheduler_agent_4445.sh
  • Edit the ./bin/jobscheduler_agent_4445.sh.
  • First you find a LSB Header which describes the run levels etc. when you use the instance script as init script in /etc/init.d.
    • The "Provides" entry in the LSB Header has to be unique. Add the port at the value of the "Provides" entry.

      ### BEGIN INIT INFO
      # Provides:          JobSchedulerAgent4445
      # Required-Start:    $syslog $remote_fs
      # Required-Stop:     $syslog $remote_fs
      # Default-Start:     3 5
      # Default-Stop:      0 1 2 6
      # Description:       Start JobScheduler Agent
      ### END INIT INFO

  • Further you all environment variables.
  • Use the environment variable SCHEDULER_USER to operate the Agent for a user account that is different from the one that starts the Agent.
    • Use the environment variable SCHEDULER_HTTP_PORT or the option -http-port=#### to start the Agent for a port that is different from the default setting.
    • Make sure that the directories SCHEDULER_LOG_DIR and SCHEDULER_PID_FILE_DIR are readable and writable for the different user accounts

     

  • No labels