function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravi Kumar 259Ravi Kumar 259 

If i want the time to set as 8.30 pm in schedule apex?how do u achieve it

KaranrajKaranraj
Using CORN expersion you can able to schedule, below is the example to run the apex class to run daily at 8.30 pm

Expression
0 30 20 * * ?
Sample code to schedule the apex programtically 
proschedule p = new proschedule();
String sch = '0 30 20 * * ?';
system.schedule('One Time Pro', sch, p);

For more details check this link - https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
 
Ravi Kumar 259Ravi Kumar 259
Thanks