we have a few mikrotiks deployed at hotels with hotspot setup
on those units we have the following script.
this is copied from a mikrotik where the script is in fact working.
:set date [/system clock get date]
:set month [:pick $date 0 3]
:set day[:pick $date 4 6]
:set year[:pick $date 7 11]
:if ($month = jan) do={
/ip hotspot user set user1 password="CASS01";
/sy sche set HotspotCodeChange start-date=("feb/01/" . $year);}
:if ($month = feb) do={
/ip hotspot user set user1 password="CASS02";
/sy sche set HotspotCodeChange start-date=("mar/01/" . $year);}
:if ($month = mar) do={
/ip hotspot user set user1 password="CASS03";
/sy sche set HotspotCodeChange start-date=("apr/01/" . $year);}
:if ($month = apr) do={
/ip hotspot user set user1 password="CASS04";
/sy sche set HotspotCodeChange start-date=("may/01/" . $year);}
:if ($month = may) do={
/ip hotspot user set user1 password="CASS05";
/sy sche set HotspotCodeChange start-date=("jun/01/" . $year);}
:if ($month = jun) do={
/ip hotspot user set user1 password="CASS06";
/sy sche set HotspotCodeChange start-date=("jul/01/" . $year);}
:if ($month = jul) do={
/ip hotspot user set user1 password="CASS07";
/sy sche set HotspotCodeChange start-date=("aug/01/" . $year);}
:if ($month = aug) do={
/ip hotspot user set user1 password="CASS08";
/sy sche set HotspotCodeChange start-date=("sep/01/" . $year);}
:if ($month = sep) do={
/ip hotspot user set user1 password="CASS09";
/sy sche set HotspotCodeChange start-date=("oct/01/" . $year);}
:if ($month = oct) do={
/ip hotspot user set user1 password="CASS10";
/sy sche set HotspotCodeChange start-date=("nov/01/" . $year);}
:if ($month = nov) do={
/ip hotspot user set user1 password="CASS11";
/sy sche set HotspotCodeChange start-date=("dec/01/" . $year);}
:if ($month = dec) do={
/ip hotspot user set user1 password="CASS12";
:set year ($year + 1);
/sy sche set HotspotCodeChange start-date=("jan/01/" . $year);}
below is the scheduler script
/sy script run HotspotCodeChanger
this all works fine on currently deployed mikrotiks using ros versions pre v3
im trying to setup a new mikrotik for an existing hotel customer requesting this kind of functionality to eliminate people from leeching the bandwidth.
I have everything setup properly i copied the above scripts and only modified what the password should be changed to every month.
When i manually run the script then gointo ip>>hotspot>>user the password field remains empty
if i open new terminal and type /ip hotspot user set user1 password="CASS09"; then go back into ip>>hotspot>>user there is indeed a password now assigned to user1 this script works in pre v3 ros why isn't it changing the password in this newer mikrotik running ros 3.22 hardware on this newer router is rb433 not that it should matter.
My thinking is even if there were an issue with the scheduler component when i manually run the script it should create the password for user1 I know its not because when i run this script on the newer mikrotik then check ip>>hotspot>user then double click on user1 the password field remains blank, whereas on the working mikrotiks you can see the user1 password and know its working.
I ask the mikrotik community to please help me out.
In my mind this seems to be an issue with coding changes between the various ros versions.
since the same script works fine in mikrotiks running ros v2.9.46 and lower.