How to schedule a Schedulable class at specified time instantly in Salesforce?

Sample Code:

AccountUpdateScheduler obj = new AccountUpdateScheduler();

String cron = '0 30 15 29 10 ? 2015';
System.schedule('Testing', cron, obj);

The above code will execute AccountUpdateScheduler exactly at 3:30 PM on 20th October 2015.

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