Community discussions

MikroTik App
 
jarosoup
Long time Member
Long time Member
Topic Author
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Hotspot Trial User - feature request

Tue Jan 23, 2007 3:38 am

While the trial user feature of the Hotspot has been very useful, we've found that the reset time for trial users is problematic as it's based on the time the user is active (Trial Uptime Reset). A lot of users seem to be expecting their trial time to reset at midnight, but only find that if they try to use the service again the next day, but an hour earlier, their time is still expired and so would have to wait another hour for the time to reset.

Is it possible to have the option of using Trial Uptime Reset or a new feature like "Trial Reset Time" where you enter the time of day that the trial user in the profile will get reset?

Thanks.
 
User avatar
mpuria
just joined
Posts: 13
Joined: Sun Dec 06, 2020 12:56 am
Location: Philippines
Contact:

Re: Hotspot Trial User - feature request

Sat Jan 23, 2021 6:10 pm

interesting topic
A script would solve this by running every midnight and purging trial users
Script:
/system script
add dont-require-permissions=no name="Daily HS Trial Reset" owner=admin \
    policy=read,write source="#Reset Hotspot Trial users daily\r\
    \n/ip hotspot user remove [find where name~\"^[T][-].{17}\"]\r\
    \n/ip hotspot active remove [find where user~\"^[T][-].{17}\"]\r\
    \n:log info \"Force logout of hotspot trial users - daily trial reset\"\r\
    \n}"
/system scheduler
add interval=1d name="Daily HS Trial Reset" on-event="Daily HS Trial Reset" \
    policy=read,write start-date=jan/23/2021 start-time=00:00:00

Who is online

Users browsing this forum: jookraw, NetworqAndy, torchify, Valerio5000, zabloc and 85 guests