Scheduler
SchedulerJobInfo
Information about scheduled jobs.
- processName – The process name of the scheduled job.
- jobConfiguration – The job configuration of the scheduled job.
- recordConfiguration – The record configuration of the scheduled job.
- recordLevelSecurity – The record level security of the scheduled job.
- className – The Apex class name of the scheduled job.
- parameters – The parameters passed to the scheduled job.
- interval – The interval of the scheduled job.
- isActive – A boolean flag indicating if the scheduled job is active.
- chunkSize – The chunk size of the scheduled job.
- queryLimit – The query limit of the scheduled job.
- enableDefaultQueueableFinalizer – A boolean flag indicating if the default queueable finalizer is enabled for the scheduled job.
- enforceUniqueBatch – A boolean flag indicating if the scheduled job enforces a unique batch.
- isFeatureEnabled – A boolean flag indicating if the feature is enabled for the scheduled job.
- featureFlag – The feature flag of the scheduled job.
SchedulerQueueable
SchedulerQueueable(String queueableClassName)
The class constructor takes in the queueableClassName parameter, which is used to initialize the queueableClassName property.
init(SchedulerJobInfo schedulerConfig)
Takes in the schedulerConfig parameter, which is used to initialize the properties of the class with the job configuration.
Signature:
forvendi.SchedulerQueueable.init(SchedulerJobInfo schedulerConfig);
Parameters:
- schedulerConfig - parameter, which is used to initialize the properties of the class with the job configuration.
Return Value:
New instance of SchedulerJob or self reference.
run()
Runs scheduler job.
Signature:
forvendi.SchedulerQueueable.run();
Return Value:
void
execute(ModificationContext ctx)
Executes logic for modification.
Signature:
forvendi.SchedulerQueueable.execute(ModificationContext ctx);
Parameters:
- ctx - the modification context used for executing the logic.
Return Value:
void
execute(QueueableContext queueableContext)
Executes the logic for modification, handling any exceptions and logging the result.
Signature:
forvendi.SchedulerQueueable.execute(QueueableContext queueableContext);
Parameters:
- queueableContext - the context for the queueable execution
Return Value:
void
SchedulerBatch
SchedulerBatch()
Constructs a new instance of the SchedulerBatch class.
init(SchedulerJobInfo schedulerConfig)
Takes in the schedulerConfig parameter, which is used to initialize the properties of the class with the job configuration.
Signature:
forvendi.SchedulerBatch.init(SchedulerJobInfo schedulerConfig);
Parameters:
- schedulerConfig - parameter, which is used to initialize the properties of the class with the job configuration.
Return Value: New instance of SchedulerJob or self reference.
prepareContextQuery()
Prepare query string to retrieve data for the context.
Signature:
forvendi.SchedulerBatch.prepareContextQuery();
Return Value:
The prepared query string.
prepareContextIterable()
Prepare an iterable of SObjects to be used as context data.
Signature:
forvendi.SchedulerBatch.prepareContextIterable();
Return Value:
The prepared iterable of SObjects.
prepareCountQuery()
Prepare query string to retrieve .the count of data for the context.
Signature:
forvendi.SchedulerBatch.prepareCountQuery();
Return Value:
The prepared count query string.
execute(SObject[] records, ModificationContext ctx)
Execute the processing of the given records and modification context.
Signature:
forvendi.SchedulerBatch.execute(SObject[] records, ModificationContext ctx);
Parameters:
- records - the array of SObject records to process.
- ctx - the modification context for the records.
Return Value:
void
execute(Database.BatchableContext context, SObject[] scope)
Executes the processing for the given batch context and array of records.
Signature:
forvendi.SchedulerBatch.execute(Database.BatchableContext context, SObject[] scope);
Parameters:
- context - the batch context for the processing
- Scope - the array od SObject records to process.
Return Value:
void
shouldRun()
Check if scheduler job should be processes.
Signature:
forvendi.SchedulerBatch.shouldRun();
Return Value:
True if job should run.
run()
Run scheduler job.
finish()
Finalizes batch process