Purging Obsolete Scenarios
By default, Insight 5 retains all completed compute jobs in the repository. Eventually, this will consume significant amounts of space and impact performance. Insight 5 can be configured to regularly purge completed jobs.
The purge task can:
- run according to any schedule that can be configured using a cron expression. For more, see Cron Expressions below.
- be configured to only remove scenarios when a specific time after completion has elapsed / be configured to remove scenarios a specific time after completion.
The two values are set in the application.properties file on the server.
Property name |
Description |
---|---|
insight.server.persistence.compute.job.expunge.schedule | The time of day at which the job will run, expressed as a cron value. This defaults to run at midnight. |
insight.server.persistence.compute.job.max.age | The time expired since the job finished executing, which defines the maximum age of the compute scenario. This can be expressed in seconds, minutes, hours, or days by using the appropriate suffix, such as 5s, 5m, 5h, 5d. The default value of 0 disables evaluation which means jobs will not be deleted. |
Configuring Obsolete Scenario Purging
Complete these steps to configure the task that removes old completed jobs. By default, the task runs daily at midnight; the job age is set to 0 (zero) to disable evaluation.
- Navigate to the server installation directory. These instructions use the term <INSTALLDATADIR> to describe the path to your installation directory. This path will normally be C:\ProgramData\FICO\Xpress Insight 5\Server\config unless otherwise set by your IT department.
- Use a suitable text editor to open the application.properties file in the <INSTALLDATADIR>/config directory.
- Locate the two following entries and edit the associated values:
- insight.server.persistence.compute.job.max.age=[TimeSinceScenarioCompleted]
- insight.server.persistence.compute.job.expunge.schedule=[CronExpression]
- Save and close the file, then reboot the worker.
Available Cron Expressions
The purge task accepts a cron expression as the delete schedule. Cron expressions that can be used in the
application.properties file use the following format:
<second> <minute> <hour> <day-of-month> <month> <day-of-week>
![]() |
Note The cron expressions
command and
<year> are not available.
|
Certain special characters can also be used in expressions.
Character | Represents | Description |
---|---|---|
* | (all) | Event should happen for every time unit |
? | (any) | Used in the <day-of-month> and <day-of -week> fields to denote the arbitrary value. For example, to specify "5th of every month" regardless of what the day of the week falls on that date, use "?" in the <day-of-week> field. |
- | (range) | Determines the value range. ("10-11" in <hour> field means "10th and 11th hours") |
, | (values) | Used to specify multiple values. For example, "MON, WED, FRI" in <day-of-week> field means on the days "Monday, Wednesday, and Friday" |
/ | (increments) | Used to specify the incremental values. For example, a "5/15" in the <minute> field, means at "5, 20, 35 and 50 minutes of an hour" |
L | (last) |
Dependent on context.
|
W | (weekday) | Used to specify the weekday (Monday to Friday) nearest to a given day of the month. |
# | Used to specify the Nth occurrence of a weekday of the month. |
The time settings in a cron expression are applied using the timezone configured on the host server.
Examples
The examples below demonstrate the formatting used, and the special characters available in a cron expression.
Expression | Definition |
---|---|
0 0 12 * * ? | 12:00 pm (noon) every day |
0 0 0 * * ? | 12:00 am (midnight) every day |
0 30 7 ? * MON-FRI | At 7:30 am every Monday, Tuesday, Wednesday, Thursday, and Friday |
0 0 18 L * ? | 6 pm on the last day of every month |