3 answers
Hi Srikanth,You can schedule the class by calling the batch class I hope this below help article about that information could help you: Below is the sample that was mentioned in the article:
>> https://www.minddigital.com/how-to-call-batch-apex-by-scheduler-class-within-salesforce/Looking forward for your response.Do let me know if this helps or incase if there are any questions do let me know.Regards,Anutejglobal with sharing class SchedularForBatchApex implements Schedulable
{
global void execute(SchedulableContext sc)
{
ID BatchId = Database.executeBatch(new RunBatchApex (), 200);
}
Public static void SchedulerMethod()
{
string con_exp= ‘0 0 1 * * ?’;System.schedule(‘RunBatchApexTest’, con_exp, new SchedularForBatchApex());
}
}