I have RouterOs 4.10 with hotspot user account that has different profiles:
the users profiles are:
normal
money (the user has not paid yet)
not paid (the user is late and has not paid )
I want a script that is activated on the 27th of each months and do the fallowing:
1-users with “not paid” profile are disabled(not deleted)
2-users with “money” profile moved to “not paid” profile
3-users with “normal” profile moved to “money” profile
I have set each profile with appropriate setting that is needed
Edit: Extra Question
in profile “money” , I have fixed adertise url and I manually set the advertisement interval to:
day 1 of the month : 6hr
day 2 of the month : 5hr
day 3 of the month : 4hr
day 4 of the month : 3hr
day 5 of the month : 2hr
day 6 of the month : 1hr
day 7 of the month :30min
day 8 of the month :15min
day 9 of the month:10 min
day 10 of the month: 5min How can I do this automatically?
1 - yes
2 - to compare the day of the month to ‘27’:
:local day [:pick [/system clock get date] 4 6];
:if ($day = "27") do={
/ip hotspot user disable [/ip hotspot user find profile="not paid"]
/ip hotspot user set [/ip hotspot user find profile="money"] profile="not paid"
/ip hotspot user set [/ip hotspot user find profile="normal"] profile="money"
}
To do the advertising URL resetting as you asked in the edited post:
:local day [:pick [/system clock get date] 4 6];
:if ($day = "01") do={
/ip hotspot user profile set [/ip hotspot user profile find name="money"] advertise-interface=6h
}
:if ($day = "02") do={
/ip hotspot user profile set [/ip hotspot user profile find name="money"] advertise-interface=5h
}