Hello Kirandeep,
We can do this by creating an apex schedule class first as following:
// Apex Schedule Class
global class ScheduleBatchApex implements Schedulable {
global void execute(SchedulableContext sc) {
className b = new className();
database.executebatch(className);
}
}
After this follow the below steps to schedule apex class:
- Search apex classes in setup
- After selecting apex classes, click schedule apex button.
- Select label of schedulable class and select schedule class which you have created from lookup.
- Define frequency and time on which you want your class to be scheduled.