Versions Compared

Key

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

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Scope

The JobSchedulerCleanupHistory Job described in this article is delivered with JobScheduler versions 1.10.x and older.

Display feature availability
EndingWithRelease1.10

Users of JobScheduler versions 1.11 and newer should refer to the Database Maintenance Scripts article.

The JobScheduler stores for each task and order its log into the database tables:

  • SCHEDULER_HISTORY
  • SCHEDULER_ORDER_HISTORY
  • SCHEDULER_ORDER_STEP_HISTORY

The job sos/dailyschedule/CreateDaysSchedule (before JobScheduler release 1.11) stores records into the database table

  • DAYS_SCHEDULE

 

The job sos/jade/jade_import stores records into the database table

  • JADE_FILES
  • JADE_FILES_HISTORY

The job sos/jade/ReportingFacts (before JobScheduler release 1.11) stores records into the database tables

  • REPORT_*

 

Without regular maintenance, these tables can become very large, which can reduce the performance and eventually result in no more space being If nobody cares, then these tables are very large and the performance goes down or there is no more space available.

To avoid this, you should regularly run this job. ...

  • the job /sos/housekeeping/scheduler_cleanup_history (before JobScheduler release 1.11)
    • If you choose the 'Housekeeping' package

...

    • during the

...

    • installation then you find this job in ./config/live/sos/housekeeping/scheduler_cleanup_history

...

    • .

This job can

  1. ...delete logs which are older than the parameter delete_history_interval
  2. ...shrink log entries (remove debug lines) which are younger than the parameter cleanup_history_interval

The second function is very time consuming and generates a lot of payload.
Here, when many records are processed, it can even cause the error

Code Block
 COM 80020009 Exception occurred. [step] [] [Z-JAVA-105 Java exception java.lang.OutOfMemoryError ("Java heap space"), method = spooler_process () Z [], in Remote_module_instance_server :: step], method = call

It is strongly recommended that you suppress the shrink functionality and uses only the delete functionality.

Parameterization of JobSchedulerCleanupHistory since release 1.3.12.1285

  • the scripts
    • ./bin/cleanup_jobscheduler_tables.(sh|cmd)
    • ./bin/cleanup_reporting_tables.(sh|cmd)

Parametrization of scheduler_cleanup_history job (before release 1.11)

This job deletes records which are older than the parameter delete_interval

Code Block
 <?xml version="1.0" encoding="iso-8859-1"?>
 
 <job title = "Delete log entries in Job Scheduler history">
 
    <description>
       <include file = "jobs/JobSchedulerCleanupHistory.xml"/>
    </description>
     
    <params>
      <!-- strongly recommended: value=0 suppresses the cleanup -->
      <param name = "cleanup_history_interval" value = "0" />
      <!-- example: value=7 deletes all records older than 7 days -->
      <param name = "delete_history_interval" value = "7" />
    </params>
    
    <script language      = "java"
            java_class    = "sos.scheduler.job.JobSchedulerCleanupHistory"/>
    
    <!-- cleanup history entries every day of the week at the given hour -->
    <run_time let_run = "yes"
              begin   = "00:00"
              end     = "24:00">
       <period single_start = "01:00"/>
    </run_time>
 
 </job>

...

Parametrization of scheduler_cleanup_history job (before release 1.3.12.1285)

Code Block
 <?xml version="1.0" encoding="iso-8859-1"?>
 
 <job title = "Delete log entries in Job Scheduler history">
 
    <description>
       <include file = "jobs/JobSchedulerCleanupHistory.xml"/>
    </description>
     
    <params>
      <!-- buggy: value=0 selects all records for cleanup -->
      <!--param name = "cleanup_history_interval" value = "0" /-->
      <!-- workaround: value=1 selects max. only one record for cleanup -->
      <param name="cleanup_history_task_id" value="1"/>
      <!-- workaround: value=1 selects only one record for cleanup -->
      <param name="cleanup_history_order_id" value="1"/>
      <!-- example: value=7 deletes all records older than 7 days -->
      <param name = "delete_history_interval" value = "7" />
    </params>
    
    <script language      = "java"
            java_class    = "sos.scheduler.job.JobSchedulerCleanupHistory"/>
    
    <!-- cleanup history entries every day of the week at the given hour -->
    <run_time let_run = "yes"
              begin   = "00:00"
              end     = "24:00">
       <period single_start = "01:00"/>
    </run_time>
 
 </job>