Community discussions

MikroTik App
 
andrew97
just joined
Topic Author
Posts: 2
Joined: Fri May 26, 2023 2:21 pm
Location: philppines
Contact:

enabling/disabling Trial

Tue May 07, 2024 4:41 am

i have created a script that can disable/enable trial, the scenario is when a trial user is active it will automatically disable the trial, and when the active trial is done on his time alloted it will automatically enable the trial, this scenario will cause the hotspot to accept trial one users at a time, trial users have to wait for the hotspot portal trial button to be visible. tried and tested it for a 1 hour delay, my question is, can the mikrotik accepts a longer delay like 5 hours. below is the code, i used routeros-17.14.3-mmips.npk the code must be in trial profile on-login script.

/ip hotspot profile set [ find name="hsprof1" ] html-directory=sd1/public login-by=http-chap,mac-cookie
:delay 1h;
/ip hotspot profile set [ find name="hsprof1" ] html-directory=sd1/public login-by=http-chap,trial,mac-cookie trial-uptime-limit=1h trial-user-profile=trial
 
andrew97
just joined
Topic Author
Posts: 2
Joined: Fri May 26, 2023 2:21 pm
Location: philppines
Contact:

Re: enabling/disabling Trial

Thu May 09, 2024 8:31 am

solved found out that mikrotik handles ms need to convert minutes to milliseconds,

Who is online

Users browsing this forum: No registered users and 6 guests