mirror of
https://github.com/pothi/mikrotik-lte-scripts.git
synced 2026-01-20 16:49:33 +00:00
Delay as variable
This commit is contained in:
parent
21c3b39845
commit
90f495761c
1 changed files with 5 additions and 2 deletions
|
|
@ -13,6 +13,8 @@
|
|||
# Note: The SMS is removed from the inbox after sent by Email and forwarded
|
||||
# even if email and forward fail! So, test it often!
|
||||
|
||||
:local delayDuration 5s
|
||||
|
||||
:global adminEmail
|
||||
:if ([:typeof $adminEmail] = "nothing" || $adminEmail = "") do={
|
||||
:log error "adminEmail is not defined or nil."; :error "Error: Check the log"; }
|
||||
|
|
@ -39,12 +41,13 @@
|
|||
:do {
|
||||
/tool sms send lte1 phone-number=$smsForwardPh message=$smsMessage
|
||||
} on-error={ /tool e-mail send to="$adminEmail" subject="Sending SMS Failed" body="Check the log" }
|
||||
:delay 2s
|
||||
:delay delayDuration
|
||||
|
||||
# Send Email to $adminEmail
|
||||
/tool e-mail send to="$adminEmail" body="$smsMessage" \
|
||||
subject="SMS from $smsPhone at $smsTimeStamp"
|
||||
:delay 3s
|
||||
:delay delayDuration
|
||||
|
||||
remove $i
|
||||
:delay delayDuration
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue