in Sysadmin

Automatic Mikrotik shutdown at specific time

I’m using Mikrotik wAP access point for home Wi-Fi. At night, for various reasons, I don’t want my Wi-Fi on, so I set up automatic shutdown at midnigth and automatic start up at 6am.

Problem is, in Mikrotik, you can schedule automatic shutdown but not startup. When the device was shut down, only way to start it up again is to plug it out from power outlet and plug it in again. To do this automatically, you’ll need outlet power timer switch similar to this.

If you want setup similar to mine, do this:

  • schedule Mikrotik shutdown  at 23:50 (it needs about 10-15sec to completely shutdown)
  • setup timer switch to turn off at 00:00
  • setup timer switch to turn on at 06:00

When the timer switch is turn on, Mikrotik automatically starts up and you got working Wi-Fi again.

To schedule Mikrotik shutdown every day at 23.50h, add this to Mikrotik’s system scheduler:

mikrotik_shutdown

Or as script:

/system scheduler add name=”shutdown” start-date=”sep/02/2016″ start-time=”23:50:00″ interval=”1d” on-event=”/system shutdown”

Write a Comment

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    • Hey Tariq, thanks for your comment! Yes, shutdown command ask for confirmation when typed, but it doesn’t ask for confirmation when called from a script. So, it’s working. Tested and working on my RouterBOARD wAP.

  1. How type a script to make routerboard ON again, after shutwdown.
    for example, my routerboard has shutdown/OFF at 01:00 AM anda will be ON at 07:00 AM

    • Hey, thanks for your question. Unfortunately, that is not possible. After the routerboard has shutted down, the only way to power it on is to power cycle it – plug it out from power, and plug it in again.

      If you only want to disable Wi-Fi over night, you can disable and enable wlan interface via script and scheduler. Let me know if you need an example.