How to schedule same Scheduler Class twice or thrice or multiple times in Salesforce?

Sample Code:

SchedulerClass obj = new SchedulerClass();
String cron = '0 30,30,30 8,12,15  * * ? *';
System.schedule('SchedulerClass', cron, obj);

In the above example, SchedulerClass will run daily at 8.30 AM, 12.30 PM and 3.30 PM.

To know more about scheduling, please check the below link

http://www.infallibletechie.com/2014/06/systemschedule-in-apex-scheduler-in.html

Cheers!!!

No comments:

Post a Comment