3 réponses
Yes It is possiable. Salesforce does not allow to schedule bach class every minute. But you can use trick to schedule it for every minute.Use a function and run a for loop to schedule the class for every minute for 1 hr. Example :Like schedule 4.05 ---> after one hr it will run at 5.05.then for 4.06 ---> it will run again at 5.06.for 4.07 ---> will again run at 5.07.This is how schedule it for 60 times for every minute. Every minute will execute after 1 hr which is allowed.Here is the function and CRON EXPRESSION that runs every minutes
If it helped you. support this answer.// CRON EXPRESSION to schedule per minute in salesforce
global static void runSchedule(){
for(Integer i =0; i < 60; i++){
String CRON_EXP = '0 '+i+' * * * ?';
GenericRecordSchedulableClass gensSch = new GenericRecordSchedulableClass();
System.schedule('Generic every min'+i, CRON_EXP, gensSch);
}
}