Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-486

Provide a job that forces execution of late jobs and job chains

    XMLWordPrintable

Details

    • Feature
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 1.12.7

    Description

      Current Situation

      • Jobs and job chains might not be executed if the Master (or server that hosts the Master) is not available for the scheduled start time.
      • This applies e.g. to maintenance windows that include a shutdown of the Master. Maintenance windows that do not require shutdown of a Master can be handled by using a "pause" that enqueues planned task starts to a point in time when the Master is continued.
      • If a user wants to catch up on a number of jobs that have not been executed due to inavailability of a Master then the Daily Plan view can be used: this view shows "planned", "late" jobs and orders that can be followed by available links and that can be started manually.

      Desired Behavior

      • The task to catch up on planned, late jobs and orders should be automatically performed by a job.
      • The Daily Plan is used as a basis and all planned, late jobs for the current day are started.
      • This new job can be executed automatically on start-up of the JobScheduler Master:
        • Users can choose to activate/deactivate this job.
        • By default the job will not be automatically executed on start-up of JobScheduler Master.
      • The job should be parameterized
        • to include or exclude any late jobs to be executed.
        • to exclude specific folders and job paths from execution. This can be handled by a list of folders or job paths that are specified by a regular expression.

      Parameters

      • ignore_folder_list
        • Example: /a/b*;/c;/a/d/c
        • A semicolon seperated list of folders.
        • These folders will be ignored by this job.
        • If the folder name ends with * then the folder and all subfolders will be ignored.
      • ignore_order_list
        • Example: /a.*,1;.*/c/test,2;/a/b/c/fest.*
        • A semicolon seperated list of job chains.
        • The name is used as a regular expression
        • These job chains will be ignored by this job.
        • The orders are specified as job_chain(orderId)
      • ignore_job_list
        • Example: /a.*/b/c/test;.*/c/test;/a/b/c/fest.*
        • A semicolon seperated list of jobs.
        • The name is used as a regular expression
        • These jobs will be ignored by this job.
      • jobs
        • Example: /a.*/b/c/test;.*/c/test;/a/b/c/fest.*
        • A semicolon seperated list of jobs.
        • If this parameter is set, only those jobs will be started.
        • The names are used as a regular expression
      • orders
        • Example: /a.*,1;.*/c/test,2;/a/b/c/fest.*
        • A semicolon seperated list of orders.
        • If this parameter is set, only those orders will be started.
        • The names are used as a regular expression.
        • The orders are specified as job_chain(orderId) where (orderId) is optional. If no orderId is set then all orders of the job chain are handled by the job.
      • day_offset (default=0d)
        • Specify the number of days to look in the past.
        • Example: -10d looks ten days into the past and shows the latecomers for the day that is 10 days in the past.
      • only_report (default=false)
        If true no job (orders) will be startet but just listed in the log.

      Permissions

      The user specified in private.conf must have the permissions

      
                 sos:products:commands, \
                 sos:products:joc_cockpit:jobscheduler_master:view, \
                 sos:products:joc_cockpit:daily_plan:view:status, \
                 sos:products:joc_cockpit:order:execute:start, \
                 sos:products:joc_cockpit:job:execute:start
      
      //For the job CheckHistory: sos:products:joc_cockpit:history:view:status, \
      

      Job Definition

      <job  order="yes" stop_on_error="no" name="checkForLatecomers" title="Check for Latecommers">
          <script  language="java" java_class="com.sos.jitl.latecomers.JobSchedulerStartLatecomersJSAdapterClass"/>
          
          <run_time />
      </job>
      
      

      Test Instruction

      Test Configuration

      • Open JOE and use the wizard to create standalone job, using template job "JobSchedulerStartLatecomers".
      • Add the job parameters <ignore_folder_list>, <ignore_order_list>, <ignore_job_list>, <jobs>, <orders>, <day_offset>, <only_report>from wizard to include or exclude the jobs, orders or job chains which has be executed or not to be executed.

      Test-Cases

      • Test Case 1: Execute all the orders which are late today. By using following parameters :
        <day_offset>: 0d
        <orders>: /. * 
        <only_report> : true 
        
        • Test Case Execution
          • Login on to the JOC Cockpit and start the task.
        • Test Case Validation
          • Positive Case
            • All the Orders which are late are displayed in the task log
          • Negative Case
            • All the Order which are late are not displayed in task log
      • Test Case 2: Execute all the orders which are late today except one. By using following parameters :
        <day_offset>: 0d
        <ignore_order_list>: /FolderA/job_chainA,daily_100  
        <only_report> : true 
        
        • Test Case Execution
          • Login on to the JOC Cockpit and start the task.
        • Test Case Validation
          • Positive Case
            • All the Orders which are late are displayed in the task log except the one which is ignored
          • Negative Case
            • All the Order which are late are not displayed in task log
      • Test Case 3: Execute all the jobs which are late today. By using following parameters :
        <day_offset>: 0d
        <jobs>: /.*  
        <only_report> : true 
        
        • Test Case Execution
          • Login on to the JOC Cockpit and start the task.
        • Test Case Validation
          • Positive Case
            • All the Jobs which are late are displayed in the task log
          • Negative Case
            • All the Jobs which are late are not displayed in task log
      • Test Case 4: Execute all the jobs which are late today except one. By using following parameters :
        <day_offset>: 0d
        <jobs>: /.*  
        <ignore_job_list>: /FolderA/job3 
        <only_report> : true
        
        • Test Case Execution
          • Login on to the JOC Cockpit and start the task.
        • Test Case Validation
          • Positive Case
            • All the Jobs which are late are displayed in the task log except the one which is ignored
          • Negative Case
            • All the Jobs which are late are not displayed in task log
      • Test Case 5: Execute all the orders,jobs which are late today except those which are in FolderC. By using following parameters :
        <day_offset>: 0d
        <ignore_folder_list>: /FolderC 
        <only_report> : true 
        
        • Test Case Execution
          • Login on to the JOC Cockpit and start the task.
        • Test Case Validation
          • Positive Case
            • All the orders, jobs which are late are displayed in the task log except the one which are in the folder which is ignored.
          • Negative Case
            • All the Order,jobs which are late are not displayed in task log.
      • Note: In all the above test cases the value of parameter <only_report> is set ‘true’ as, if it is set as ‘false’ then for each test case we need to create orders or jobs.

      Test Execution

      • The test execution depends on a parameter <only_report>.
        • If the value of this parameter is " true " then no jobs will be started. Only the names of those job orders which are late, which matches the parameter list will be listed in log.
        • If the value of this parameter is " false " then jobs will be started. Only the names of those job orders which are late, which matches the parameter list will be started.

      Attachments

        Issue Links

          Activity

            People

              ur Uwe Risse
              ap Andreas Püschel
              Kanika Agrawal Kanika Agrawal
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: