Page 1 of 1

Script for Daily Uptime Limit for Hotspot users

Posted: Thu Jan 08, 2009 1:06 am
by Megateq
Could someone help me out on script that will restrict the number of hours a user should be up and browsing per day. ie, if a user is to be allowed access for say, one month, i need to be able to restrict his/her uptime to say, 5hrs per day for the one month. Once this uptime limit is reached, the hotspot should log the user out, and allow the user access again only on the next day.
Am still novice to Script and new to Mikrotik

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Thu Jan 08, 2009 9:08 am
by sergejs
The configuration for HotSpot only.

- to set limit for 5 hours of Internet usage,
ip hotspot user add limit-uptime=5h name=<username>
- to allow 5 hours a day, you need to reset counters once a day or over the required period,
ip hotspot user reset-counters [find]
add this line to /system sceduler and set required interval, for example 1 day at 00:01 to reset the counters and allow new 5 hours for the same user.

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Thu Jan 15, 2009 9:08 am
by gtrappmann
hallo sergejs,

is it right that this is not running with user manager...
i tried to reset counters, but it only resets "used time", not "left time".
so if "left=0" you donĀ“t get new time if you reset the user ...

regards

gerd

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Sun Oct 03, 2010 4:51 pm
by Mayssam961
I Have the same problem i need to refresh the users every single night at 12AM
So they can use the internet next day morning ,
Any Scrips ?
Please

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Tue Oct 12, 2010 12:51 am
by andrescamino
hi

you may find this useful....I had the same problem so I did this

hope it helps

http://forum.mikrotik.com/viewtopic.php?f=2&t=45457

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Tue Mar 22, 2011 12:10 pm
by Mayssam961
thanks, that really helped

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Thu Jun 16, 2011 11:41 pm
by JP_Wireless
Very helpful, But can we reset some set of users in a profile instead of all users? if yes how can this be achieved from the script?

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Thu Jun 16, 2011 11:43 pm
by fewi
See the other thread in which you asked the same question.

Asking the same question all over the place wastes other people's time.

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Fri Jun 17, 2011 10:49 pm
by JP_Wireless
See the other thread in which you asked the same question.

Asking the same question all over the place wastes other people's time.
When nobody is responding or helping!

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Fri Jun 17, 2011 11:47 pm
by fewi
The two posts are three minutes apart.

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Sat Jun 18, 2011 2:51 pm
by JP_Wireless
I was just anxious of a solution as I am under pressure from my clients!

Uptime Limit reached

Posted: Sat Feb 29, 2020 9:20 am
by velkot
hi everyone,

we've using MikroTik user man, within the validity period it shows an error message "uptime limit reached". for example, i generated 30 days validity cards. these cards are expired within a week and it shows an error "uptime limit reached".
help me to rectify this error...

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Thu Oct 20, 2022 10:31 am
by joshuanieves32
The configuration for HotSpot only.

- to set limit for 5 hours of Internet usage,
ip hotspot user add limit-uptime=5h name=<username>
- to allow 5 hours a day, you need to reset counters once a day or over the required period,
ip hotspot user reset-counters [find]
add this line to /system sceduler and set required interval, for example 1 day at 00:01 to reset the counters and allow new 5 hours for the same user.
How about to Reset Counter everyday using script thanks

Re: Script for Daily Uptime Limit for Hotspot users

Posted: Thu Oct 20, 2022 4:22 pm
by eldoncito2019
{
 /ip hotspot user reset-counters
}

I hope it will be of great help @joshuanieves32.




EL DONCITO.