Wiki expire_hotspot_users Script is not Updatet and doesn't work, here is my own new EXPIRES HOTSPOT USER SCRIPT

Copy to Hotspot User Profile Script on Login

Testet by Peter Eck, Brazil, RouterOS v.6.33rc10 Misbe

Important: Set to every hs-user the ,, Limit Uptime "

{
:local date [ /system clock get date ]
:if ( [ /ip hotspot user get $user comment ] = "" ) do={
[ /ip hotspot user set $user comment="$date"]
}
}
:foreach h in=[/ip hotspot active find] do={
:global user [/ip hotspot active get $h user];
:global mac [/ip hotspot active get $h mac-address];
/ip hotspot user set $user mac=$mac
}
{
:foreach h in=[/ip hotspot active find] do={
:local user [/ip hotspot active get $h user];
:local mac [/ip hotspot active get $h mac-address];
:local logdate [/ip hotspot user get $user comment];
:local date [/system clock get date];
:local time [/system clock get time];
:local upt [/ip hotspot user get $user limit-uptime];
/system scheduler remove [/system scheduler find name="$user"];
/system scheduler add comment="$date . $time" interval=$upt name="$user" on-event="/ip
_hotspot active remove [/ip hotspot active find user="$user"]\r
\n/ip hotspot user disable [/ip hotspot user find name="$user"]\r
\n//ip hotspot cookie remove [/ip hotspot cookie find name="$user"]\r
\n/system scheduler remove [/system scheduler find name="$user"]"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive
start-date=$logdate start-time=12:00:00
}
}

\

This Script sets automatic the user Mac-Address and the Date comment to every user by Login

By Login the Script create a Schedule Rule with, user name, date and time, interval, removes after time

Limit the Cookies, disable the user and remove the same from hotspot active, at least after the reached interval time
the script removes the own schedule rule #

For me the Script works very fine without bugs !!!!!!!!!!!!! :smiley: :laughing: :sunglasses: