Scheduling and Configuring System Housekeeping
You use Cron expressions to schedule the Housekeeping system job, and then configure the Objects operation parameter in the Housekeeping Job operation to select the configurable objects for which you want to clean records and define whether to use record creation or update dates to evaluate the records to be deleted. You can also apply extra filtering conditions in SQL format to evaluate records.
To schedule and configure system housekeeping:
1. In Max Admin, click > , and then in the list view, click Housekeeping.
2. On the record page, in the Cron Expression field, if needed, modify the default expression, which is set to 2:00 AM every day:
0 0 2 ? * *
|
|
• The default time zone of the value in the Cron Expression field is set by the Default Time Zone field value in the active System Setting record. To set a different time zone, specify a value in the Time Zone field of the Housekeeping system job record.
• For more information about cron expressions, see Cron Trigger Tutorial on the Quartz Scheduler website.
|
3. In the top left corner, click
Save and Close (

), and then click > .
4. In the list view, click Housekeeping Job, and then on the record page, on the Operation Parameters tab, click Objects.
5. On the Objects operation parameter record page, in the Parameter Value field, add new entries to the JSON array in the following format to specify the objects for which you want to clean records:
{
"object": "io_your_object"
}
|
|
Be sure to use the full identifier of each object for which you want to clean records.
|
6. To filter records to be deleted by their creation times, add "useCreatedOn: true" to the relevant object entries in the array as follows:
{
"object": "io_your_object",
"useCreatedOn": true
}
7. To filter records to be deleted by additional conditions in SQL format, add
"filters" : [sql_conditions]" to the relevant object entries in the array as follows, and then in the top left corner, click
Save and Close (

).
{
"object": "io_your_object",
"useCreatedOn": true,
"filters" : ["io_status[1] in ('3e5123d8-1f2e-4a0c-a912-2f559156162b', '374d19a6-f2a6-4008-9a77-df9aaa70da73')"]
}