Schedule managed package controllers using Developer Console
Schedule Managed Package Controllers Using Developer Console
Many case we will get request to schedule apex class for specific time that is not possible through OOB functionality. So we have to us developer console to schedule job like 12:15 AM, 1.15 AM.
Not Managed controllers :
apexclassname sc = new apexclassname();
String sched = ‘0 15 01 * * ? *’; // refer below table
System.schedule(‘UniqueName’, sched, SC);
Managed controllers :
Packageprefix.apexclassname sc = new Packageprefix.apexclassname();
String sched = ‘0 15 01 * * ? *’; // refer below table
System.schedule(‘schedulejobuniquename’, sched, SC);
Name | Values | Special Characters |
Seconds | 0–59 | None |
Minutes | 0–59 | None |
Hours | 0–23 | , – * / |
Day_of_month | 1–31 | , – * ? / L W |
Month | 1–12 or the following: JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC | , – * / |
Day_of_week | 1–7 or the following: SUN MON TUE WED THU FRI SAT | , – * ? / L # |
optional_year | null or 1970–2099 | , – * / |
0 Comments