Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 'Jobs in Job Chains' added

Table of Contents

Use of Jobs

Excerpt
  • Jobs are the basic unit for the processing of executable files, shell scripts, commands and of job implementations based on the JobScheduler internal API.
  • Jobs can be executed independently from one another. However, job starts can also be made dependent on the execution result (success, failure, exit code) of

...

  • preceding jobs.
  • Jobs can also be started according to the results of preprocessing operations if a monitor is specified for that operation.
  • Jobs can be executed in parallel by a configurable number of tasks.

Read more on the features of Job Objects in the job documentation.

Job Patterns

Independent Job Start Pattern

...

Flowchart
Job1 [label="Job 1",fillcolor="lightskyblue"]
Job2 [label="Job 2",fillcolor="lightskyblue"]
Job3 [label="Job 3",fillcolor="lightskyblue"]
Job1_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess1 [label="End state: success",fillcolor="palegreen"]
EndStateError1 [label="End state: error",fillcolor="lightcoral"]
Job2_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess2 [label="End state: success",fillcolor="palegreen"]
EndStateError2 [label="End state: error",fillcolor="lightcoral"]
Job3_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess3 [label="End state: success",fillcolor="palegreen"]
EndStateError3 [label="End state: error",fillcolor="lightcoral"]
 
Job1 -> Job1_successful
Job1_successful -> EndStateSuccess1
Job1_successful -> EndStateError1

Job2 -> Job2_successful
Job2_successful -> EndStateSuccess2
Job2_successful -> EndStateError2
 
Job3 -> Job3_successful
Job3_successful -> EndStateSuccess3
Job3_successful -> EndStateError3

 

Job Start Pattern based on Execution Results

  • Jobs are started based on the execution result of a previous job.
  • If Job 1 returns an exit code 1 then Job 2 will be executed.
  • If Job 1 returns an exit code 2 then Job 3 will be executed.

 

Flowchart
Job1 [label="Job 1",fillcolor="lightskyblue"]
Job1_Exit_Codesuccessful [shape="diamond",label="Exit Code execution successful \n based on exit code?",fillcolor="white"]
Job2EndStateSuccess [label="Job 2End state: success",fillcolor="lightskybluepalegreen"]
Job3Job2 [label="Job 32",fillcolor="lightskyblue"]
EndStateSuccessJob3 [label="End state: successJob 3",fillcolor="palegreenlightskyblue"]
EndStateError [label="End state: error",fillcolor="lightcoral"]
 
Job1 -> Job1_Exit_Codesuccessful
Job1_Exit_Codesuccessful -> EndStateSuccess [label=" in case of exit code 0 \n End state: success "]
Job1_Exit_Codesuccessful -> Job2 [label=" in case of exit code 1 \n start job 2 "]
Job1_Exit_Codesuccessful -> Job3 [label=" in case of exit code 2 \n start job 23 "]
Job1_Exit_Codesuccessful -> EndStateError [label=" in case of other exit codes \n End state: error "]

 

Parallel Tasks Job Start Pattern

  • Jobs can be executed in multiple parallel tasks.
  • All tasks are executed independently from one another.

 

Flowchart
Job1 [label="Job 1",fillcolor="lightskyblue"]
Task1 [shape="circle",label="Task 1",fillcolor="orange"]
Task2 [shape="circle",label="Task 2",fillcolor="orange"]
Task3 [shape="circle",label="Task 3",fillcolor="orange"]
Task1_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess1 [label="End state: success",fillcolor="palegreen"]
EndStateError1 [label="End state: error",fillcolor="lightcoral"]
Task2_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess2 [label="End state: success",fillcolor="palegreen"]
EndStateError2 [label="End state: error",fillcolor="lightcoral"]
Task3_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess3 [label="End state: success",fillcolor="palegreen"]
EndStateError3 [label="End state: error",fillcolor="lightcoral"]
 
Job1 -> Task1
Task1 -> Task1_successful
Task1_successful -> EndStateSuccess1
Task1_successful -> EndStateError1

Job1 -> Task2
Task2 -> Task2_successful
Task2_successful -> EndStateSuccess2
Task2_successful -> EndStateError2

Job1 -> Task3
Task3 -> Task3_successful
Task3_successful -> EndStateSuccess3
Task3_successful -> EndStateError3

Jobs in Job Chains

In contrast to the stand-alone use of Jobs described above, Jobs are often used in Job Chains with Orders where the processing of a Job is dependent on the results of processing of previous Jobs in the Job Chain. See the Job Chains article for more information.