Community discussions

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

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
SiB
Forum Guru
Forum Guru
Posts: 1888
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.
 
kcavery001
just joined
Posts: 9
Joined: Mon Feb 22, 2021 5:59 am

Re: Auto SMS sending script doesn't work properly

Mon Feb 22, 2021 9:57 am

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

Re: Auto SMS sending script doesn't work properly

Wed Feb 24, 2021 7:54 pm

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.
 
MirekZ
just joined
Posts: 1
Joined: Mon Nov 01, 2021 11:47 pm

Re: Auto SMS sending script doesn't work properly

Mon Nov 01, 2021 11:52 pm

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

Re: Auto SMS sending script doesn't work properly

Sat Jan 29, 2022 1:37 am

MirekZ write:
I need a script to send SMS automatically to the customer mobile number twice a month (on specific date) using the "lte" modem.
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.

Who is online

Users browsing this forum: ko00000000001, mbezuidenhout and 19 guests