Page 1 of 1

i need script clear user expired on mikrotik v5

Posted: Thu Oct 18, 2012 8:53 am
by oldsnake
last time script clear user expired on mikrotik v4 it work but today on V5 not work Please show script clear user expired for mikrotik v5
Thank

Re: i need script clear user expired on mikrotik v5

Posted: Thu Oct 18, 2012 7:08 pm
by c0d3rSh3ll
post your script.

Re: i need script clear user expired on mikrotik v5

Posted: Fri Oct 19, 2012 9:43 am
by oldsnake
#Clear credit expire user, check by credit left and credit till time
#Test On RouterOS 4.11 Only
:foreach i in [/tool user-manager user find subscriber=admin] do={
:if ([/tool user-manager user get $i credit-left]=0s) do={
:if ([/tool user-manager user get $i credit-till-time] != "") do={
/tool user-manager user remove $i
}
}
}

#Clear expire user by Uptime-Used >= Uptime Limit
#Test On RouterOS 4.11 Only
:foreach i in [/tool user-manager user find subscriber=admin] do={
:if ([/tool user-manager user get $i uptime-used]>=[/tool user-manager user get $i uptime-limit]) do={
/tool user-manager user remove $i
}
}

Re: i need script clear user expired on mikrotik v5

Posted: Sun Feb 24, 2013 6:07 am
by oldsnake
#Clear credit expire user, check by credit left and credit till time
#Test On RouterOS 4.11 Only
:foreach i in [/tool user-manager user find subscriber=admin] do={
:if ([/tool user-manager user get $i credit-left]=0s) do={
:if ([/tool user-manager user get $i credit-till-time] != "") do={
/tool user-manager user remove $i
}
}
}

#Clear expire user by Uptime-Used >= Uptime Limit
#Test On RouterOS 4.11 Only
:foreach i in [/tool user-manager user find subscriber=admin] do={
:if ([/tool user-manager user get $i uptime-used]>=[/tool user-manager user get $i uptime-limit]) do={
/tool user-manager user remove $i
}
}
no reply?