Advertisement
Guest User

Untitled

a guest
Jul 12th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  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');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement