- All Implemented Interfaces:
- com.centurylink.mdw.common.service.RegisteredService, com.centurylink.mdw.model.monitor.ScheduledJob
@ScheduledJob(value="ProcessCleanup",
schedule="${props[\'mdw.cleanup.job.cleanupscheduler\']}",
enabled="${props[\'mdw.cleanup.job.enabled\']}",
defaultEnabled=false,
isExclusive=true)
public class ProcessCleanup
extends com.centurylink.mdw.services.workflow.RoundRobinScheduledJob
implements com.centurylink.mdw.model.monitor.ScheduledJob
This script cleans up old database entries from tables that are older than a specified time
Make sure appropriate db package is imported and Cleanup-Runtime.sql is there.
Add following to mdw.yaml
timer.task:
ProcessCleanup: # run every 15 min
TimerClass: com.centurylink.mdw.timer.cleanup.ProcessCleanup
Schedule: 0,15,30,45 * * * * # to run daily at 2:30 am use : Schedule: 30 2 * * ? *
RuntimeCleanupScript: Cleanup-Runtime.sql
ProcessExpirationAgeInDays: 225 #How old process instance should be to be a candidate for deleting
MaximumProcessExpiration: 1 #How many process instances to be deleted in each run
ExternalEventExpirationAgeInDays: 225
CommitInterval: 1000
if you need to make change in above properties then first delete the db entry by identifying the row using
this sql: select * from event_instance where event_name like '%ScheduledJob%'
Then re-start the server/instance for new clean-up properties to be effective.