Skip to content

How to run the batch delete apex classes? #638

Answered by jongpie
baobao917 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @baobao917 I think the easiest option is to schedule the LogBatchPurgerScheduler class to run daily under Setup. You can do that with these steps:

  1. Under Setup, go to Apex Classes and click the button Schedule Apex

  1. On the Schedule Apex page, provide a Job Name, select LogBatchPurgeScheduler for Apex Class, and choose the frequency options you'd like

Once you've done that, the scheduled job will automatically delete any old data in Log__c, LogEntry__c and LogEntryTag__c, based on the date field Log__c.LogRetentionDate__c.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by baobao917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Layer: Log Management Items related to the custom objects & Logger Console app Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler
2 participants