Revenue Management API Developer Reference
global with sharing class StagingServiceDeleteScheduledJob implements Schedulable
Deletes the Staging Records that are not related to the latest version asynchronously. It can be used by the Apex Scheduler to run at specific times.
//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. // Use Apex Scheduler to delete staging data at specific times. // Create an instance of the class. ffrr.StagingServiceDeleteScheduledJob job = new ffrr.StagingServiceDeleteScheduledJob(); // Schedule the class for every Sunday at midnight for the whole year of 2016. String sch = '0 0 0 * SUN 2016'; // use the System.Schedule method to execute the class. System.Schedule('Delete Job', sch, job);
global void execute(SchedulableContext sc)
Deletes the Staging Records that are not related to the latest version asynchronously.