You are on page 1of 1

VERSI 1

:local date [/system clock get date];


:local time [/system clock get time];
:log info "";
{
:if ( [ /ip hotspot user get $user comment ] = "" ) do={
[ /ip hotspot user set $user comment=$user]
}
}
/system script add name=$user policy=read,write source="/ip hotspot user remove
[find comment=$user]\r\nip hotspot active remove [/ip hotspot active find
user=$user]\r\nsystem scheduler remove $user\r\nsystem script remove $user"
system scheduler add name=$user start-time="$time" interval=1d policy=read,write
on-event=$user

VERSI 2
DI ISI DI USER PROFIL
/system scheduler add name="remove-user-$user"interval=1d on-even="/ip hotspot
active remove [find user=$user] ; /ip hotspot user set$user profil=BLOKIR; system
scheduler remove [find name=remove-user-$user]"
DI ISI DI PROFIL BLOKIR
/system scheduler add name="remove-blokir-$user"interval=1d on-even="/ip hotspot
active remove [find user=$user] ; /ip hotspot user remove [find name=$user]; system
scheduler remove [find name=remove-blokir-$user]"

VERSI 3 RIFAI UCIHA


AUTO DELETE USER HOTSPOT By DURATION
*******************************************
local a $user
if ([len [/system scheduler find name=$a]] = 0) do={[
/system scheduler add name=$a interval="30d 00:00:00" start-time="03:00:00" on-
event="if ([len [/ip hotspot user find name=$a]] = 1) do={[/ip hotspot user remove
[find name=$a]]}
/system scheduler remove [find name=$a]"
]}

PENJELASAN:
interval: sesuaikan berapa lama scheduler tersebut di jalankan. sebagai contoh 30d
00:00:00 yg artinya 30 hari
start-time: jam berapa scheduler di jalankan, sebagai contoh 03:00:00 yg artinya di
jalankan jam 3 pagi

AUTO DELETE USER HOTSPOT By QUOTA


*******************************************
/ip hotspot user remove [find profile="Pembeli-1Gb" bytes-in>1073740000]
/ip hotspot user remove [find profile="Pembeli-1Gb" bytes-out>1073740000]
/ip hotspot user remove [find profile="Pembeli-1Gb" bytes-total>1073740000]

PENJELASAN:
profile: akan mencari seluruh user yang nama profile nya Pembeli-1Gb
bytes-in: akan menghapus user yang byte-in nya lebih besar dari 1073740000
bytes-out: akan menghapus user yang byte-out nya lebih besar dari 1073740000
bytes-total: akan menghapus user yang byte-total nya lebih besar dari 1073740000
Silahkan sesuaikan dengan pengaturan hotspot mikrotik kalian, agar lebih jelas
silahkan simak videonya.
http://idsly.bid/wX2X

You might also like