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/dailyplan/CreateDailyPlan (since JobScheduler release 1.11) stores records into the database table

...

 

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

...

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

  • REPORT_*

The plugin com.sos.jitl.reporting.plugin.FactPlugin (since JobScheduler release 1.11) stores records into the database tables

...

 

Without regular maintenance, these tables can become very large, which can reduce the performance and eventually result in no more space being available.

...

  • 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.
  • the scripts
  • This script cleans the database tables
    • SCHEDULER_HISTORY
    • SCHEDULER_ORDER_HISTORY
    • SCHEDULER_ORDER_STEP_HISTORY
  • It expects the database connection setting in ./config/hibernate,cfg.xml.
  • This script has only one argument for the age of the records.
    • All records older then the specified age are removed.
  • If this script is called without an argument then you get its usage

    Code BlockUsage: cleanup_jobscheduler
    • ./bin/cleanup_jobscheduler_tables.(sh|cmd)
    • ./bin/cleanup_reporting_tables.(sh|cmd)

Parametrization of cleanup scripts (since release 1.11)

  • The scheduler_cleanup_history job is not longer included in the setup of the JobScheduler since release 1.11.
  • Further the setup knows two databases; the JobScheduler database and the Reporting database.

./bin/cleanup_jobscheduler_tables.(sh|cmd)

    • _tables.(sh|cmd)
    age | age : Age of table entries Example: - Remove entries older than 14 days then call cleanup_jobscheduler_tables.cmd 14 - Remove all entries then call cleanup_jobscheduler_tables.cmd 0

./bin/cleanup_reporting_tables.(sh|cmd)

  • This script cleans the database tables
    • DAILY_PLAN
    • JADE_FILES
    • JADE_FILES_HISTORY
    • REPORTING_*
  • It expects the database connection setting in ./config/reporting_hibernate,cfg.xml.
  • This script has two arguments for the age of the records and for the range of the tables.
    • All records older then the specified age are removed.
    • You can filter the tables in which the records will be removed with the range argument. Possible values are all, reporting, dailyplan or yade.
  • If this script is called without an argument then you get its usage

    Code BlockUsage: cleanup_reporting_tables.(sh|cmd) range age range | which tables? all, reporting, dailyplan, yade age | Age of table entries Example: - Remove entries older than 14 days in all tables then call cleanup_reporting_tables.cmd all 14 - Remove entries older than 14 days in reporting tables then call cleanup_reporting_tables.cmd reporting 14 - Remove all entries then call cleanup_reporting_tables.cmd all 0

Parametrization of scheduler_cleanup_history job (before release 1.11)

...