Latest Updates

Travel to Technology

Dayton Metro Library

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);
NameValuesSpecial Characters
Seconds0–59None
Minutes0–59None
Hours0-23, – * /
Day_of_month1–31, – * ? / L W
   
Month1–12 or the following:, – * /
 JAN 
 FEB 
 MAR 
 APR 
 MAY 
 JUN 
 JULY 
 AUG 
 SEP 
 OCT 
 NOV 
 DEC 
   
Day_of_week1–7 or the following:, – * ? / L #
 SUN 
 MON 
 TUE 
 WED 
 THU 
 FRI 
 SAT 
optional_yearnull or 1970–2099, – * /