Script to turn off and turn on the router automatically

Hey Teachers:
someone can help me with a script to turn off the router, and will automatically switch on :question:

thanks

why would you ever turn off a router? sorry, but if the router is off, no scripts can be running :slight_smile:

but when you have WOL feature, you may use neighbour router to switch on your one =)

no, WOL from router can turn on a PC. it’s not meant for turning on Router.

but if router is on x86… =)

I still think it’s weird to keep the router powered off, and turn it on only sometimes :slight_smile:

well … u can use any timer

http://www.digital-loggers.com/lpc.html

Hi, I need a script to turn off the routerboard “anykind” when the voltage of the battery is below 10V and to switch power on when voltage is 11V.
This scenario is usefull for our stations that have only solar power, and we don’t want to damage the battery, and we dont want to go to the station each time it is shutdown.
We don’t want to use POE routerboard to turn on and off the port.

necro-jacking a topic from 2009 is not recommended.

What you need is not a script. Can routerboard read out voltage at all? But even then. Wrong place inside ROS.

You are talking about a low voltage cutoff.

something like https://m.banggood.com/YX-X0001-12V-Battery-Undervoltage-Management-Module-Undervoltage-Automatic-Recovery-Battery-Load-Power-off-Protection-Switch-p-1844489.html

It sounds more like you want to use the UPS module in RouterOS (you need to install this separately) and have the router connected to a proper UPS. This will allow the router to do monitoring and hibernate when the runtime is too low and then turn back on when the power comes back.

Why write this thing?
Once turned off you have to go and turn it on “manually”,
there is nothing automatic in the RouterBOARD that, once turned off, makes it turn on again,
or must be find a UPS to which RouterOS can sends commands like "now turn me off and turn me back on when the power returns "

Hi
What is the difference between “hibernate system” from UPS signal and “system shutdown”? How to achieve hibernate state from script to wekeup ROS after power is back from UPS?