Home

 

Empty the trash on a schedule

Edit configuration property settings to set up a schedule on which to permanently delete the activities and entries that have been moved to the Trash view.

To edit configuration files, use wsadmin. See Start the wsadmin client for details.

Activities that are deleted are moved to the Trash view and can be restored from the Trash view. You can schedule the permanent deletion of activities and entries after a time interval that you specify. When the scheduled job runs, the activities and entries in the Trash view are permanently deleted from the system. Items that are purged from the Trash view are not recoverable.

To schedule the permanent removal of activities or entries from the Trash view...

  1. Use wsadmin to access and check out the Activities configuration files.

    1. Access the Activities configuration file:

    2. Network deployment:

        execfile("profile_root/config/bin_lc_admin/activitiesAdmin.py")
        

      If prompted to specify which server to connect to, type 1.

      The information about which server to connect to is only used by wsadmin when you are running administrative commands to collect statistics.

    3. Check out the Activities configuration files...

        ActivitiesConfigService.checkOutConfig("<working_directory>",
        "cell_name")
        

      where:

      • <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories in the file path, even if you are using the Microsoft Windows operating system.

      • cell_name is the name of the WebSphere Application Server cell hosting the Lotus Connections feature. This argument is required even in stand-alone deployments. This argument is also case-sensitive, so type it with care. If you do not know the cell name, do one of the following to determine it:

        • Stand-alone deployment: From the file system...

            WAS_HOME\profiles\profile_name\config\cells\
            

      • Network deployment: From wsadmin...

          print AdminControl.getCell()
          

      For example:

      • AIX/Linux:

          ActivitiesConfigService.checkOutConfig("/opt/act/temp","foo01Cell01")
          

    4. Microsoft Windows:

        ActivitiesConfigService.checkOutConfig("c:/act/temp","foo01Cell01")
        

  2. Display the current Activities configuration settings...

      ActivitiesConfigService.showConfig() 
      

    From the returned list, look for the settings begin with jobs.TrashAutoPurge; these control trash deletion. Determine which property values you want to change:

      jobs.TrashAutoPurge.scheduler

      Defines the Quartz scheduler that this job is associated with. The default value is cluster. Specify one of the following options:

      • cluster: Runs the job on any available server. Select this option in most cases because trash removal is a taxing job and this option enables the Quartz Scheduler to select a server that can handle it. The default setting is cluster and can be used even when Activities is installed on a single, (non-clustered) server.

      • local: Runs the job on all servers. Do not use this option unless you are using a stand-alone server configuration because trash removal is a taxing job that must access all of the activities in the database and the local server might not be able to access all of them.

      • cell_name\<node_name>\server_name: Specifies a specific server that you want the scheduler to run on. For example: Cell01\Node01\server1. When you use an administrative command to run the scheduler for this job, specify "local" as the value of the schedulerName parameter.

      jobs.TrashAutoPurge.daysRetention

      Number of days after which you would like activities and their entries removed from the Trash view. Specify the value in days. The default value is 90.

      Do not set this value to 0. When it is set to 0, activities and their entries are not removed from the Trash view.

      jobs.TrashAutoPurge.trigger.cronExpression

      Frequency with which the job to check for expired content runs. Use the Quartz Enterprise Job Scheduler API CronExpression class format to specify the interval. The default value is 0 0 2 ? * SUN, which specifies that the job should run weekly at 2 AM on Sunday. For information about how to format this value, go to the following external Web site: http://www.opensymphony.com/quartz/api/org/quartz/CronTrigger.html

  3. To change the property values...

      ActivitiesConfigService.updateConfig(<property>, <value>)
      

    For example:

      ActivitiesConfigService.updateConfig(“jobs.TrashAutoPurge.scheduler”, “local”) ActivitiesConfigService.updateConfig(“jobs.TrashAutoPurge.daysRetention”, “100”) ActivitiesConfigService.updateConfig(“jobs.TrashAutoPurge.trigger.
       cronExpression”, “0 15 10 L * ?”)
      

    The 0 15 10 L * ? value schedules the job to run at 10:15 AM on the last day of every month.

  4. After making changes, check the configuration files back in and do so during the same wsadmin session in which you checked them out for the changes to take effect. See Applying property changes for details.

 

Example

When making configuration changes to the TrashAutoPurge scheduled job, you are modifying settings in the oa-jobs.xml file. The following sample oa-jobs.xml file segment removes content from the Trash view after 100 days and runs the job to check for expired content at 10:15 AM on the last day of every month.


Manage trash

Choosing a scheduler for a job

 

Related tasks

Checking out the Activities configuration files

Apply property changes

 

Related reference


Activity statistics


+

Search Tips   |   Advanced Search