Community discussions

MikroTik App
just joined
Topic Author
Posts: 1
Joined: Tue Dec 15, 2020 2:34 pm
Location: Bangladesh

Auto SMS sending script doesn't work properly

Tue Dec 15, 2020 2:47 pm

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?
User avatar
Forum Guru
Forum Guru
Posts: 1314
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: Auto SMS sending script doesn't work properly

Wed Dec 16, 2020 8:58 am

because this loop is to fast and work like send all sms in one 1s... you must do some delay between sms.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | - free network schematic | - free ScreenShot software
At vacation until 15.jan.2021

Who is online

Users browsing this forum: No registered users and 17 guests