Purging can be done using the below steps first configure what work types you want to purge and next schedule it
1) designer studio--> system-->tools-->Purge/Archive--> configure (in the last steps of this configure you can start schedule process)
2) designer studio--> system-->tools-->Purge/Archive--> schedule Process
Phase 1: Configure the activity — Define the dataset that will be purged/archived. The dataset comprises a work pool in your application, and a set of work types (classes), folders, and covers within the work pool. The dataset is also qualified by the age of resolved work items to be purged/archived. Each configuration is an instance in class Data-Admin-ArchiveSettings.
Phase 2: Schedule the activity — For each cycle you specify:
Start date and the frequency of each purge/archive cycle.
Number of items you want to purge and/or archive. If this value is less than the number of items in the age group defined in Step 1, the oldest items are purged. The others remain in the source tables until the next cycle.
A time limit for processing items within each purge/archive cycle. If the time limit is exceeded, the process stops and restarts after a defined number of hours has elapsed. These settings help spread out processing demands during a single cycle.
At the defined cycle start time, the purge/archive agent first populates an archive ZIP file with the work items and their data as defined in Step 1. The agent then deletes the table data. Although the work items are purge/archived, the work item ID is left unchanged, to allow restoration or archived wok items without affecting current work items.
You can alter the above-scheduled activity and configure the process of entering details in your own custom table.