# Delay sending sms messages

**URL:** <https://forum.ionicframework.com/t/delay-sending-sms-messages/107186>\
**Category:** cordova\
**Created:** [September 30, 2017, 3:45am UTC](https://forum.ionicframework.com/t/delay-sending-sms-messages/107186 "2017-09-30T03:45:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silverbugnz](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/silverbugnz/32/113737_2.png) [@Silverbugnz](https://forum.ionicframework.com/u/Silverbugnz)\
**Post date:** [September 30, 2017, 3:45am UTC](https://forum.ionicframework.com/t/delay-sending-sms-messages/107186/1 "2017-09-30T03:45:29Z")

</div>

Hey All,

Just wanting some advice on how best to send a bunch of sms messages with a small delay between each message.

I have an array of numbers to send to, I’m just not sure how to structure my page code so that it works it way through the array, with say a 2 second delay between each item, while still being able to access root items in the class.

I figured i might be able to do it with setinterval or settimeout. But I’m not having much luck getting it working…

---

<div class="post-metadata">

**Author:** ![Silverbugnz](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/silverbugnz/32/113737_2.png) [@Silverbugnz](https://forum.ionicframework.com/u/Silverbugnz)\
**Post date:** [October 1, 2017, 4:09am UTC](https://forum.ionicframework.com/t/delay-sending-sms-messages/107186/2 "2017-10-01T04:09:43Z")

</div>

Managed to figure it out

I wasn’t clearing the setInterval correctly which is why I was having trouble.
