Mikrotik – reset user manager counter after day

have a Mikrotik router board and use userman radius for accounting.

I want to set a transfer limit to it’s users, but I want that transfer limit to be reset periodically, like every day.

Can I do this in Mikrotik usermanager and how?

I too am looking for a way to do this. I would like to be able to configure a user that has a given transfer limit e.g. 300M over a 24h period. If they use up the download allowance then it should block/disable the user as usual, but I’d like it to become usable again the day after without having to do anything.

Thanks in advance

A little update from what I’ve found…

I’m only using a single user for the hotspot. I found the most robust way to clear and reset counters to be to remove the sessions and user and recreate them. This takes a couple of lines of script which can then be triggered nightly with the scheduler.

/tool user-manager session remove [/tool user-manager session find user="user1"];
/tool user-manager user remove [/tool user-manager user find username="user1"];
/tool user-manager user add name="user1" password="user1" shared-users=unlimited customer="admin";
/tool user-manager user create-and-activate-profile user1 profile="Guest" customer="admin";

I have a profile with a limitation of 300M tranfer on it which is the “Guest” profile refered to above. Hope this helps. I tried the reset-counters approach but it didn’t seem very reliable. Not sure what was going wrong there.

first create another customer in user manager. In user manager, profile, create new limitation with data allowance 300m.
Create new profile and assign the new limitation to it.
Now create the user you want to use these profile for and please ensure, owner is the name of the new customer account you created earlier.

go to scheduler;
add new schedule
Name: Name of schedule (eg reset counter)
Start Date: (the date you want the scheduler to start)
Start Time: When you want the scheduler to run eg 00:01:00 means it will reset counter 1 minute after 12am
Interval: 1d 00:00:00
on event of:
type these in; /tool user-manager user reset-counters [/tool user-manager user find where customer=“ticket”]

(“ticket” is name of customer you created earlier, so substitute with your own customer name)

Policy: check reboot, write, test, sniff, read, policy, password, sensitive.

Apply and ok. The scheduler checks for every user created with customer ID “ticket” and resets their counter 1 minutes after 12am.