You need to sign in to do that
Don't have an account?
roni shore
CRON to run batch thrice 23:00, 1:40 & 4:00
Hi Guys- can anyone help out on this, I want to schedule a batch so it runs thrice at 23:00, 1:40 & 4:00
String cronStr = '0 45 23,1,4 * * ?';
Hours I can specify comma seperated but minutes it's not taking, pls suggest
String cronStr = '0 45 23,1,4 * * ?';
Hours I can specify comma seperated but minutes it's not taking, pls suggest
Greetings to you!
CRON in Apex do not support comma separated parameters in Minutes and Seconds.
You can schedule 3 instances:
Then schedule it:
Please refer to the below link which might help you further with the above requirement.
https://salesforce.stackexchange.com/questions/83774/how-to-schedule-a-job-twice-a-day
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas