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

Compare with Current View Page History

« Previous Version 5 Next »

We always recommend using "order jobs" (i.e. one or more jobs in a job chain) together with multiple orders rather than multiple "standalone jobs" (i.e. jobs being started directly).

Overview

The advantages of order jobs are that the jobs and job chains:

  • can be independent of the parameter values - only "What the job itself does" is implemented;
  • are more or less generic, meaning that "What a job achieves" is determined by the order parameters;
  • can be easily transported between different environments (e.g. dev, test, prod);
  • can be more easily changed or modified, if required;
  • can take account of dependencies between jobs and
  • can handle errors more efficiently.
    These last three points are described in more detail below.

Example

Consider the case of 700 Servers, with 5 housekeeping jobs (e.g. backup, clean up, etc.) on each server.

 *If you create jobs for this situation, you need 700* 5 = 3500 jobs, which would be more or less identical. The only difference between the jobs would be the parameters (or constants, hard coded in the jobs). 
  • Using the order approach, you would need 5 jobs and one job chain. An order would be needed for each server, which would contain the parameters for all 5 jobs in the chain. This approach would decrease the complexitiy of the scheduling and greatly simplify making changes to the jobs.

In detail ....

The following list shows some of the advantages of Order Jobs in Job Chains over Standalone Jobs in more detail:

  • Dependencies between Jobs
     Job Chains can be configured to take account of dependencies between Jobs, so that, for example, one Job may only start if other Jobs have successfully finished.
     Dependencies can be clearly seen and 
     Only one log is generated per Order. This covers all the Jobs in the Job Chain. 
    
  • Code Care
     Often you have the situation where Jobs differ only in their parameterisation.
     When such Jobs are run in Job Chains, and started by Orders containing the different parameters, it is often possible to configure a small number of Order Jobs to run in multiple Job Chains. 
    
    In this situation:
  • If you have to change something in a Job script, then you only have to do it in one Job.
  • If, instead, you had created a Job for each set of parameters then the code care would be considerably more involved.
  • Error handling
     The error handling in Job Chains is more flexible than with Standalone Jobs.
     There are several possible ways to react when Jobs in Job Chains end in error:
    
  • End the Job Chain
  • Start another Job in the Job Chain
  • Repeat the Job that ended in error
  • Suspend the Order
     A different method of error handling can be specified for each node in a job chain.
     Whenever the Job at the current Job Chain node ends in error, the Order will be either be forwarded to the node configured in the Error State, suspended or given a scheduled restart.
    
 A Standalone Job can be configured to rerun after a Job has ended in error or to stop immediately. 
 It cannot be restarted automatically until it is unstopped manually.
  • No labels