Add a comment to the wlan1 as "WIFI"
##netwatch script 1,check if internet on port 1 is down
## This will ping 8.8.8.8 on the internet, if it doesn't respond in 15 consecutive tries and if wifi is up, wlan1 interface will be disabled.
:local i 0; {:do {:set i ($i + 1)} while (($i < 15) && ([/ping 8.8.8.8 interval=3 count=1]=0))};
:if ($i=15 && [/interface wireless get [find comment="WIFI"] disabled]=no) do={:log info "Internet is down, shutdown wireless";
/interface wireless set wlan1 disabled=yes}
##netwatch script 2, check if internet on port 1 is up
## This will ping 8.8.8.8 on the internet, if it replies for 10 tries and if wifi is previously disabled, it will be enabled.
:local i 0; {:do {:set i ($i + 1)} while (($i < 10) && ([/ping 8.8.8.8 interval=3 count=1]=1))};
:if ($i=10 && [/interface wireless get [find comment="WIFI"] disabled]=yes) do={:log info "Internet is up, turn on the wifi";
/interface wireless set wlan1 disabled=no}
Add the two separate scripts on /System> Scripts.
Then add them on the scheduler /System> Scheduler Click the + sign and add the on event command like
/system script run script1
/system script run script2
Set them to run every 5 minutes if you like.