fferpcore.ScheduledJobServiceglobal with sharing class ScheduledJobService A scheduled job service structure. Methods
removeSchedulesglobal static void removeSchedules(Set<Id> existingJobs) This method aborts the scheduled jobs specified by the Ids provided. Input Parameters
Sample Code//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. List<fferpcore.ScheduledJob__c> jobs = [SELECT Id FROM fferpcore.ScheduledJob__c]; Set<Id> ids = new Set<Id>{jobs[0],...}; fferpcore.ScheduledJobService.removeSchedules(ids); runNowglobal static void runNow(Set<Id> scheduledJobIds) This method sets up a batch job and submits it for the specified scheduled jobs. Input Parameters
Exceptions Thrown
Sample Code//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. List<fferpcore.ScheduledJob__c> jobs = [SELECT Id FROM fferpcore.ScheduledJob__c]; Set<Id> ids = new Set<Id>{jobs[0],...}; fferpcore.ScheduledJobService.runNow(ids); setupSchedulesglobal static void setupSchedules(Set<Id> scheduledJobIds) This method sets up scheduled jobs on the database using their Ids to specify which to schedule. Input Parameters
Exceptions Thrown
Sample Code//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. List<fferpcore.ScheduledJob__c> jobs = [SELECT Id FROM fferpcore.ScheduledJob__c]; Set<Id> ids = new Set<Id>{jobs[0],...}; fferpcore.ScheduledJobService.setupSchedules(ids); |