Auto SMS sending script doesn't work properly

I wrote a script to automatically send SMS to all the mobile numbers kept in PPP Secret’s comment.
This is what I wrote in the script:

:foreach x in=[/ppp secret find] do{
:global number [/ppp secret get $x comment];
/tool sms send port="usb2" phone-number=$number message="Dear User, your bill is due by tomorrow. Please pay bil asap"
}

But it sends the SMS to only the first mobile number. I tried using 2 different USB modems. One is a Huawei 3G one, other is an LTE.
Same result.
How can I go over this?

because this loop is to fast and work like send all sms in one 1s… you must do some delay between sms.

how to sir? I also need this script. Thank you

example

:foreach x in=[/ppp secret find] do={
    :global number [/ppp secret get $x comment];
    /tool sms send port="usb2" phone-number=$number message="Dear User, your bill is due by tomorrow. Please pay bil asap"
    /delay 1s
  }

if delay 1s is to fast, try some 5s to check what is proper for you.

Hi, I also need help with the SMS script, please…

I am still new to the Mikrotik products. Using the RBLHGR&R11e-LTE6
I need a script to send SMS automatically to the customer mobile number twice a month (on specific date) using the “lte” modem.

Can you please help?

Many thanks,

MirekZ write:

But you can use a System > Scheduler as your a crontab executive with a one line command who send a SMS to your specific number.
I not see any difficult here, just read a documentation and any EXAMPLE of sending SMS from terminal.