Pages

Jumat, 25 April 2014

Scheduler Profile Hotspot di Mikrotik

Untuk membatasi waktu Login dan Logout Hotspot Mikrotik berdasarkan Profile, harap diganti atau disesuaikan Profilenya

Contoh : profile "siswa"

script enable
:foreach u in=[/ip hotspot user find] do={:if ([/ip hotspot user get $u profile]="siswa") do={:log warning "siswa : $[/ip hotspot user get $u name] enable"
/ip hotspot user enable $u}}}

script disable
:foreach u in=[/ip hotspot user find] do={:if ([/ip hotspot user get $u profile]="siswa") do={:log warning "siswa : $[/ip hotspot user get $u name] disable"
/ip hotspot user disable $u}}}

script diatas kita masukkan kedalam
/system scheduler pada mikrotik kita dan atur waktunya


/system scheduler
add disabled=no interval=1d name=siswa_on on-event=":foreach u in=[/ip hotspot\
    \_user find] do={:if ([/ip hotspot user get \$u profile]=\"siswa\") do={:l\
    og warning \"siswa : \$[/ip hotspot user get \$u name] enable\"\r\
    \n/ip hotspot user enable \$u}}}" policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    start-date=apr/25/2014 start-time=07:00:00
add disabled=no interval=1d name=siswa_off on-event=":foreach u in=[/ip hotspo\
    t user find] do={:if ([/ip hotspot user get \$u profile]=\"siswa\") do={:l\
    og warning \"siswa : \$[/ip hotspot user get \$u name] disable\"\r\
    \n/ip hotspot user disable \$u}}}" policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    start-date=apr/25/2014 start-time=16:00:00


Semoga bermanfaat.

Tidak ada komentar:

Posting Komentar