move user from one hotspot profile to another automatically

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?

Since this isn’t in the User Manager section I’m assuming you mean local users under “/ip hotspot user”.

/ip hotspot user
disable [find profile="not paid"]
set [find profile="money"] profile="not paid"
set [find profile="normal"] profile="money"

1-Does the command (find profile=“not paid”) find the users with that profile?
2-Is this script OK?I schedule the script to run once every 24hrs?

:local date [/system clock get date];
:local dayYear [:pick $date ([:find $date "/" 0] + 1) [:len $date]];
:local day [:pick $dayYear 0 [:find $dayYear "/" 0]];
:if ($day = "027") do={
   [/ip hotspot user
disable [find profile="not paid"]
set [find profile="money"] profile="not paid"
set [find profile="normal"] profile="money"]
}

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
}

And so on for all the different days.

thank you very much fewi for your continuous help

I tride the line
/ip hotspot user profile set [/ip hotspot user profile find name=“money”] advertise-interface=6h

but I got “expected end of command” error


edit

I see it is interval not interface

how can I remove the disabled users that are in “not paid” package

not that I don’t want to remove the active one; I just want to delete the disabled one

/ip hotspot user remove [/ip hotspot user find disabled]

I want only the one with user profile not paid. Now I don’t want to remove them

I just want to change disabled users with profile “not paid” to disabled but with profile “to be deleted”

Is it correct?

/ip hotspot user set [/ip hotspot user find profile="not paid" disabled] profile="to be deleted"

Now I understand.
You are close. The below should work.

/ip hotspot user set [/ip hotspot user find where profile="not paid" and disabled] profile="to be deleted"