SHARE
TWEET

Untitled

a guest Jul 12th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Plan {
  2.    @AuraEnabled
  3.     public static string Plan(String jobName, String d, String scheduleName) {
  4.        String jobId;
  5.        Type scheduleClass = Type.forName(scheduleName);
  6.        if (scheduleClass != null) {
  7.            Schedulable m = (Schedulable) scheduleClass.newInstance();
  8.             jobId = system.schedule(jobName, d, m);
  9.        }
  10.        return jobId;
  11.    }
  12. }
  13.      
  14. Plan A=new Plan('Test','0 0 13 * *  ?','PlanTest');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top