You need to sign in to do that
Don't have an account?
Manoj Reddi
How to write Test Coverage for this class ?
global class scheduledMerge implements Schedulable
{
public string no;
global void execute(SchedulableContext SC)
{
for(Integer i=1;i<=24;i++)
{
Date dt=System.today().addmonths(-i);
no=string.valueof(i);
Id batchInstanceId = Database.executeBatch(new BatchA(string.valueof(dt.month()),String.valueof(dt.Year()),no), 200);
}
}
}
{
public string no;
global void execute(SchedulableContext SC)
{
for(Integer i=1;i<=24;i++)
{
Date dt=System.today().addmonths(-i);
no=string.valueof(i);
Id batchInstanceId = Database.executeBatch(new BatchA(string.valueof(dt.month()),String.valueof(dt.Year()),no), 200);
}
}
}
1) https://developer.salesforce.com/docs/atlas.en-us.apex_workbook.meta/apex_workbook/apex_scheduling_2.htm
Let us know if this will help you