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 Answer
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 examplesalesforce– salesforce2015-07-15 04:08:15 +00:00Commented Jul 15, 2015 at 4:08