+ Start a Discussion
kito kidkito kid 

setting up custom time for schedular

I set up my schedular to run start from 12:00 am per hourly.

When I set it up, the time is around 14:55 , and I run the code it debug console.


System.Schedule('MyPerHourScheduleTesting', '0 0 0/1 * * ?', new Schedular_MySchedular());

But when I check from [All Scheduled Jobs] , the time for [Next Scheduled Run] is 3:00 PM.

I wonder why. any set up mistake in my code?

I just want to start to run the program at 12:00 AM sharply next morning everyday.

Am I doing the right thing?

Devender MDevender M
You can directly schedule Develop > Apex Classes > click schedule apex button.
Select weekly and select all days and Preferred Start Time as 12:00 Am
kito kidkito kid
Hi Devender, if I am using UI to set up Apex Class, how can I set it up to run per hour etc?
Devender MDevender M
scheduledBatchable scheduledBatchable = new scheduledBatchable();
String sch = '0 0 0 ? * *';
system.schedule('Merge Job', sch, scheduledBatchable );