I want to schedule my apex class to run twice a day, i.e 8 AM and 8 PM How this can be achieved? What will be the desired cron expression?
2 Answers
I have found the solution:
String sch = '0 0 11/12 * * ?';
//0 0 {time to schedule}/{hours until repeat} * * ?
This also works:
String cron = '0 00 08,20 * * ?';
Runs at 0800h and at 2000h every day