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
saurabhEventsaurabhEvent 

Scheduling Apex Batch Job Every 10 minutes

Hi All,

 

Salesforce was allowing scheduling of apex batch job using script for every 10 minutes, with recent release they do not have any way use special characters in minutes variable.

 

Is their any work around for it?

 

//Seconds Minutes Hours Day_of_month Month Day_of_week optional_year
String sch = seconds + ‘ ‘ + minutes + ‘ ‘ + hours + ‘ ‘ + dayOfMonth + ‘ ‘ + month + ‘ ‘ + dayOfWeek + ‘ ‘ + year;
//String sch = ’0 10,20,30,40,50 * * 11 ? 2013′;

 

Thanks!

Jia HuJia Hu
For what characters can be used, please see the doc,
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
Spring'13,
http://www.salesforce.com/us/developer/docs/apexcodepre/Content/apex_scheduler.htm

But, based on my understanding, you can't let job run in every 10 minutes only by 1 Scheduler.
You can add 6 scheduler to run from 0, 10, 20,...50 mins
sivaextsivaext

Hi 

 

 

i think we can schedule for every ten minutes

 

 classname var = new classname(); (batch class)

String sch= '0 10 * * * ?';

system.schedule ('schedule job name' , sch, var)

 

 

Jia HuJia Hu
String sch= '0 10 * * * ?';
will run every hour at 10 mins, not running at every ten minutes