-1

can you please give me the example of schedule apex class for every one minute .How to solve the above scenario.please give some ideas.

1

Can you explain more why you want to schedule this every minute?

And you can do like as below : which executes every 10 minutes and

scheduledApexClassName m = new scheduledApexClassName();

String seconds = ’0′; //Execute at Zero Seconds
String minutes = ’10,20,30,40,50′; //Execute at every 10th minute of hour
String hours = ‘*’; // Execute Every Hour
String dayOfMonth = ‘*’; // Execute Every Day of the Month
String month = ’11′; //Execute only in November(11)
String dayOfWeek = ‘?’; //Execute on all 7 days of the Week
String year = ’2009′; //Execute only for year 2009

//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 ? 2009′;

system.schedule(‘Registration Report’, sch, m);

Thanks sfdev

  • How to write the schedule apex class for every one minute. please give me one example – salesforce Jul 15 '15 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.