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

Compare with Current View Page History

« Previous Version 21 Next »

Introduction

Getting started with the JobScheduler

This first tutorial shows how to run a simple JobScheduler job. The job starts a simple shell script which writes "Hello World" in its log file.

JobScheduler Jobs are mainly run in Job Chains and require an Order before they can run. Orders are a trigger that starts a job chain and are assigned a state in a job chain that corresponds with the job that is to be started (normally this would be the first job in the job chain).

In particular, orders can have a payload of parameters that are processed by individual jobs.This concept is explained in more detail in our Concepts for jobs, job chains and orders article. In addition, our Job Chains article illustrates some of the basic job chain patterns that can be implemented with JobScheduler.

This example shows the steps required to run the "Hello World" job and verify that it has run correctly. The job itself and its job chain and order are available to the JobScheduler once you have copied the job, job chain and order objects to the JobScheduler's live folder as described in the JobScheduler Tutorials Requirements article.

The order will be started and monitored using the JOC web browser interface, the JobScheduler's Operations Center. A good starting point for finding out more about JOC is our JOC - JobScheduler Operations Center article.

Note that the other tutorials in this series are:

Starting Requirements

Before you start this tutorial, it is assumed that your JobScheduler has been installed and is running.
See the JobScheduler - Tutorials - Introduction and Requirements article if you have any problems.

Download the Demo File

  • Download the demo file from:
  • Unzip the file and copy the "tutorials-getting-started" folder to the JobScheduler ./config/live folder:

Run the "Hello World" Job using the JobScheduler Operations Center, JOC

  1. The simplest way to start JOC is by opening a web browser window and calling the host name and port number entered for the JobScheduler during installation.
    1. The default values are localhost and 4444.
    2. Refer to the "Installation" chapter of the JobScheduler Installation Guide if you have problems opening JOC.
    3. On Windows systems you will find a link with the host and port specified during installation in the Start Menu under:
      1. Start / SOS JobScheduler / JOC (JobScheduler Operations Center) 
    4. Once started, JOC should appear as shown in the screen-shot:

      Per default the Jobs tab should be open and show the tutorials-getting-started folder as shown above.

  2. Click the Update (every 5s) checkbox at the top center of JOE, to cause JOC to be automatically refreshed every 5 seconds.

  3. Clicking on tutorials-getting-started folder will show the hello_world_job and clicking on this job will open the Job and Task History panes as shown in the next screenshot:


  4. The most useful tab for running the job is the Orders Tab.
    1. Select this tab and open tutorials-getting-started folder and hello_world_job_chain,hello_world_order in a similar way as described for the job tab above.
      This will open the Job Chain pane in the right hand half of JOC as shown below:
    2. Now select the Show order history checkbox in the right hand Job Chain pane, which will open a second, right hand Order History pane.
    3. Click on the Order menu button to the right of the Job Chain pane as shown in the following screen-shot and select the Start order now option.

      The order (and therefore the job) will be processed almost immediately and a hello_world_order listing added in the Order History pane at the bottom right of JOC.

  5. In the Order History pane shown in the screen-shot above the order was run twice before the screen-shot was made and therefore the order is listed twice.
    Now click on your hello_world_order listing in the Order History pane, which will open a new browser window containing the log information for the order you have run.
    As can be seen in the screenshot, "Hello World" was successfully entered into the order log and the order successfully ended (set_state success in the third last line).



 

 

 

  • No labels