• elliot catherin
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Hi dear community,

I'm trying to schedule a batch apex class several time at the same start time.

I pass a parameter to my apex batch class : 

TBR_APB026_SendSMS batch = new TBR_APB026_SendSMS(partner);

And then the parameter is use to filter the data in my queryLocator :

AND ServiceTerritory.TopLevelTerritory.TBR_Partner__r.Name =: partner

 

However, when I try to schedule several instance of this apex batch class with different values in the parameter, at the same time, with the code bellow : 
 

Set<String> partners = new Set<String>{'PARTNER_A','PARTNER_B','PARTNER_C'};
for(String partner : partners){
    TBR_APB026_SendSMS batch = new TBR_APB026_SendSMS(partner);
    String sch = '0 15 10 14 2 ?';
    system.schedule('TBR_APB026_SendSMS_' + partner, sch, batch);
}

 

After that, only the first one scheduled batch class is executed, and the two others are not event started.

 

Hi guys,

I have a problem on a Lightning component i've created.

The final action of this compenent is triggering the event : navigateToSObject.

It works fine on my custom Lightning application but when I switch to the Salesforce Console, the navigateToSObject doesn't work, I stay on the same page.

I would be happy to find someone who has a solution !

Thanks

Hi dear community,

I'm trying to schedule a batch apex class several time at the same start time.

I pass a parameter to my apex batch class : 

TBR_APB026_SendSMS batch = new TBR_APB026_SendSMS(partner);

And then the parameter is use to filter the data in my queryLocator :

AND ServiceTerritory.TopLevelTerritory.TBR_Partner__r.Name =: partner

 

However, when I try to schedule several instance of this apex batch class with different values in the parameter, at the same time, with the code bellow : 
 

Set<String> partners = new Set<String>{'PARTNER_A','PARTNER_B','PARTNER_C'};
for(String partner : partners){
    TBR_APB026_SendSMS batch = new TBR_APB026_SendSMS(partner);
    String sch = '0 15 10 14 2 ?';
    system.schedule('TBR_APB026_SendSMS_' + partner, sch, batch);
}

 

After that, only the first one scheduled batch class is executed, and the two others are not event started.