Hello
I want to enable an interface in mikrotik at 20:00 and disable it at 8:00 all days
Any one have this script to help me
Best regards
Sent from my TA-1021 using Tapatalk
/system scheduler
add disabled=no interval=1d name="Disable Either??" on-event="/interface disable [find name="ether??"]" \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jun/21/2017 start-time=08:00:00
add disabled=no interval=1d name="Enable Either??" on-event="/interface enable [find name="ether??"]" \
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jun/21/2017 start-time=20:00:00
Hello can i have your email to contact with u if you can help me to do it together? ThanksUse scheduler. Not the script.
I did this for my kids (after 20:00h no internet on eth4).... Works perfectly.
In System, Scheduler add a new scheduler. Set start date, time etc....
In the white box below with name "on event": /interface disable 3
The number 3 should be changed to the interface number of the Ethernet interface you want to disable.
This is incorrect advice! Do not use it!In the white box below with name "on event": /interface disable 3
The number 3 should be changed to the interface number of the Ethernet interface you want to disable.
Code: Select all
/interface disable 3
/interface disable [find where name~"wlan"]
This seems good advice, but I am just wondering why is the construct better than just the name?NO!! don't do that!
Use the [find name="xxx"] construct.
# Wrong, because .id must not be used /interface disable 3 # Both wrong, because wlan1 exist only as string, and can be misunderstanded /interface disable wlan1 /interface disable "wlan1" # Work for single / all /interface disable [find name="wlan1"] /interface disable [find name~"wlan"] # Correct syntax for single / all /interface disable [find where name="wlan1"] /interface disable [find where name~"wlan"] # "Perfect" for single / all, because if you change interface name, the script still work.... /interface disable [find where default-name="wlan1"] /interface disable [find where default-name~"wlan"] # Correct way for disable / enable all wireless for night /interface wireless disable [find] /interface wireless enable [find]
My experience as well koolandrew, you would have to pry my MT router from my dead cold hands but I willingly gave away my capacs, except for one, for testing purposes.Thanks very much CZfan...i never saw it...i hope you are well in South Africa and staying healthy...
I have to be honest, when i think about it, i have had so many issue with Mikrotik wireless, especially with Apple products trying to connect over the last ten years, that i often give up for years at a time. I am using a CAP dual band, and i was hoping to use it instead of a Ubiquiti for my customersi but i still cannot connect specific devices to the 5g network...at least they can connect to something..which is better than my experience with Mikrotik HAP AC lite...where i cannot get Apple to connect at all.