Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Plan {
- @AuraEnabled
- public static string Plan(String jobName, String d, String scheduleName) {
- String jobId;
- Type scheduleClass = Type.forName(scheduleName);
- if (scheduleClass != null) {
- Schedulable m = (Schedulable) scheduleClass.newInstance();
- jobId = system.schedule(jobName, d, m);
- }
- return jobId;
- }
- }
- Plan A=new Plan('Test','0 0 13 * * ?','PlanTest');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement