Send emails batch wise and give break 1 hour.

prudhviraj1
Tera Guru

Send emails batch wise, send 500 mails then give 1 hour break then send another 500 users. I have tried with fix script gs.sleep it was impacting the system performance. The output of all emails i have stored in Array. I am tried with flow designer by using for each condition the output I am getting 234 mails only. I have checked the related system property the count upto 16000+.

Please suggest how to send without using system performance. 

@Ankur Bawiskar  sir please suggest 

22 REPLIES 22

Ankur Bawiskar
Tera Patron
Tera Patron

@prudhviraj1 

what's your business requirement here? why are you sending emails in batch of 500?

what's the issue in sending all at once?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar sir,

We have to sent emails to the approvers, who don't have the delegates. And Suggest them to set a delegate.

My requirement is send 500 mails to the approvers then give 1 hour break then send another 500 members.

When after run my fix script, then my Instance getting slow upto sent 500 emails.

Please suggest a fix script to send 500 emails then give 1 hour break then another batch. Without impacting the system performance.

 

@prudhviraj1 

you can use flow designer as they are asynchronous

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar , I am trying to use flow designer Script action to divide the batches, but i am getting '{}' output instead of user sys_id, used input & output type is taken Array.String.

Please check the attached script. and Configuration details

prudhviraj1_0-1734417627631.jpeg

 

 

prudhviraj1_1-1734417750415.jpeg