How to Schedule a Batch Apex class

5:36 PM

 

You can then schedule this apex class either using the standard scheduler , or just from the developer console using a simple script.


ClassName gp = new ClassName();
String cronStr = '0 0 * * * ?';
System.schedule('Job which runs at every 0th minute of hour', cronStr, gp);


ClassName gp = new ClassName();
String cronStr = '0 30 * * * ?';
System.schedule('Job which runs at every 30th minute of hour', cronStr, gp);

0 comments

Stats