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
Mohammad Hussain 7Mohammad Hussain 7 

How can we schedule a batch apex job to run every 15 min or alteast to run after 15 min from the current run?

Need to run a batch apex job every 15 mins i was able to achive this using schedulable interface and creating 4 different schedules but, is there any way to schedule only one job which run every 15min?

Also, i do not want to chain the job like scheduling the next run in the finish section.
 
p PILLIp PILLI
hi mohammad,
 could you check it systax 

System.schedule('Scheduled Job 2', '0 15 * * * ?', new ScheduledClass());
Mohammad Hussain 7Mohammad Hussain 7
Thanks for the response. But, i believe this would run the job only 15th min of every hour. If I have to run evey 15 mins then i have schedule 4 jobs at 0, 15,30,45 mins. I was looking to schedule only one job which runs every 15 mins.
Raj VakatiRaj Vakati
You need to do it like below 
 
System.schedule('Scheduled Job 1', '0 0 * * * ?', new ScheduledClass());
System.schedule('Scheduled Job 2', '0 15 * * * ?', new ScheduledClass());
System.schedule('Scheduled Job 3', '0 30 * * * ?', new ScheduledClass());
System.schedule('Scheduled Job 4', '0 45 * * * ?', new ScheduledClass());

OR THIS will run every 15 mins
 
System.schedule('Scheduled Job ', '0 0/15 * 1/1 * ? *', new ScheduledClass());

 
Mohammad Hussain 7Mohammad Hussain 7
Sorry for the late response but, i don't think 0/15 kind of format is supported. For know my solution was to schedule the next job from the finish method using scheduleBatch.