Community discussions

MikroTik App
 
oldsnake
just joined
Topic Author
Posts: 8
Joined: Thu Oct 18, 2012 8:48 am

i need script clear user expired on mikrotik v5

Thu Oct 18, 2012 8:53 am

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
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: i need script clear user expired on mikrotik v5

Thu Oct 18, 2012 7:08 pm

post your script.
 
oldsnake
just joined
Topic Author
Posts: 8
Joined: Thu Oct 18, 2012 8:48 am

Re: i need script clear user expired on mikrotik v5

Fri Oct 19, 2012 9:43 am

#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
}
}
 
oldsnake
just joined
Topic Author
Posts: 8
Joined: Thu Oct 18, 2012 8:48 am

Re: i need script clear user expired on mikrotik v5

Sun Feb 24, 2013 6:07 am

#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?

Who is online

Users browsing this forum: No registered users and 7 guests