Versions Compared

Key

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

Table of Contents

Scope

Conditions The conditions for the jobs can be checked before the job execution and after the job execution. The condition which is checked before the job execution is called In - Condition and the condition which is checked after the job execution is called Out - Condition.

  • The condition which that controls the execution of the job is referred to as In - Condition.
  • And the The condition which that either Create creates an Event or Delete Event according to the event list deletes an Event is referred to as Out - Condition.

Conditions to the job can be added to jobs depending upon whether the new job stream Job Stream is to be created or the Job Stream already exists. 

...

Creating Job Streams and Conditions

Creating a Job Stream

  • Login to the JOC Cockpit, switch to the "Job Streams" tab.
  • From the left side tree view select the folder with the jobs to which a condition should be added.
  • After clicking on folder there will be a message displayed No Job Streams found. Click Here to Add. 

Image Added

  • Click on the link to add the Job Stream.
  • A Create Job Stream pop up window will be displayed. Enter the name of the Job Stream and hit the "submit" button.

Image Added

  • Now drag and drop the jobs for which you want to add an In Condition or Out Condition.

Image Added

  • The conditions for a job can also be added or deleted by the option Edit Conditions in the action menu of the job from the List view and Card view of the Job Streams tab.
    • List view: 
      Image Added

...


    • Card view:
      Image Added
  • The

...

  • Conditions

...

  • Editor opens for the job.

...

Image Added

Adding a

...

Condition to a

...

Job in an

...

existing Job Stream

...

  • If

...

  • the Job Stream

...

  •  already exists then you can drag

...

  • & drop the job

...

  • to which you want to add a condition.
    • Note:

...

    • When dragging & dropping a job to

...

    • a Job Stream then the name of the Job Stream will be set by default to the name of Job Stream

...

    • to which the job is added

...

    • .

...

Image Added

  • When the job is
  • dropped a
  • added then the Conditions Editor pop-up window opens.

...

Image Added

How to add an In

...

Condition to a

...

Job

  • Open the Conditions Editor, if there are no In

...

  • Conditions added then in the In

...

  • Conditions tab there will be

...

  • displayed "No

...

  • In Conditions found. Click Here To Add". Click on "Click Here To Add" to add an In

...

  • Condition.

...

Image Added

  • Another Conditions Editor window will open.

...

  • Add the

...

  • Expression to be evaluated

...

  • . You can use the Expression Editor to check what Expressions are supported by Job Streams. Then select a Command which is to be executed if the

...

  • Expression evaluates to true. The In

...

  • Condition supports two commands:

    • startJob: This command starts the job according to the value of Command
    Param
    • Parameter if the
    expressions evaluate
    • Expression evaluates to true. The default value of Command
    Param
    • Parameter is now, which means the job will
    be started
    • start as soon as the result of the
    Expressions becomes
    • Expression becomes true.
    • writeLog: This command writes the message
    in
    • provided with the Command
    Param in the log. 

...

    • Parameter to the log file. By default, it writes the command to $SCHEDULER_DATA/logs/scheduler.log. 

Image Added

  • Click on the Save button to add an In Condition.

How to add an Out Condition to a job

  • Open the Conditions Editor and switch to the Out Conditions tab. There will be displayed "No Out Conditions found. Click here To add". Click on the text to add an Out Condition.

    Image Added
  • Another Conditions Editor window will open. Add the Expression to be evaluated. You can use the Expression Editor to check what Expressions are supported by Job Streams. By default, the Expression is set to "rc:0" which checks a successful run of the job indicated by return code 0. Then select an Event List which is to be executed if the Expression evaluates to true. The Out Condition supports two event lists:

    • Create Event: The Create Event event list is used to create an event if the Expression for the Out Condition evaluates to true. The default name of the Event to be created is the job name. 
    • Delete Event: The Delete Event event list is used to delete an existing Event if the Expression for the Out Condition evaluates to true.

 Image Added

  • Click on Save button to Add an In-Condition.

How to edit an existing In Condition or Out Condition with a Job Stream

  • To edit an existing In Condition or Out Condition from the Job Stream graph using the Edit Expression option from the action menu of the Condition of the job. For example, you want to update the Expression for an Out Condition of a job from rc:0 to rc:10.

    Image Added
  • Then switch to the Job Streams graph, use the action menu of the Out Condition indicated by a parallelogram after the job. Click on Edit Expression
    • Note: An In Condition for a job is indicated by a left inclined parallelogram before the job. An Out Condition for a job is indicated by a right inclined parallelogram after the job.

Image Added

  • The Conditions Editor will open. Edit the Expression and hit the "Submit" button to apply your changes.

Image Added