There are schedule A and Schedule B I want to run Schedule B after Schedule a completed Is there a way a way i can do it?
1 Answer
You can schedule another class by using system.schedule method but keep in mind you must implement the schedulable interface for the class which you want to schedule.
public class Batchclassparent implements Schedulable {
public void execute(Schedulablecontext context){
system.debug('inside parent');
system.schedule('testjob', '0 0 14 * * ?', new Batchclasschild());
}
}
public class Batchclasschild implements Schedulable {
public void execute(Schedulablecontext context){
system.debug('inside child');
}
}