How to Automatically Reboot Your MikroTik Router

Scheduling Events in RouterOS

Georgs Kozulis
3 min readNov 8, 2022

Prerequisites

  • A device running MikroTik’s RouterOS
  • Admin access to your router

Connecting to your router

First, we need to establish a connection to your router. There are multiple ways to manage a MikroTik device, but we’ll use the web-based Webfig utility.

By default MikroTik routers have an IP address of 192.168. 88.1 and the default user is admin without a password. In some cases these might be different, so you can check the device for an additional sticker that would have the correct details. You can also check the network configuration on your computer to find the gateway IP address.

When you have the connection details, just enter the device’s IP address into your browser which will take you to the Webfig authentication page where you can enter your credentials and log in.

Scheduling an automatic reboot

RouterOS doesn’t have a built-in option for automatically rebooting your device, but it has a scheduler that can be configured to run user-defined scripts — including one for running a periodic system reboot.

Go to WebFig>System>Scheduler and click Add New.

A new schedule for a daily router reboot.

Here is a rundown of the applicable configuration:

  1. Enabled: should be checked to run the schedule
  2. Name: name of the schedule (e.g. reboot)
  3. Start Date: date when the first reboot should occur
  4. Start Time: time when the first reboot should occur (HH:mm:ss)
  5. Interval: how much time until next reboot (format explained below)
  6. Policy: what permissions does the script have (we can leave only reboot)
  7. On Event: the script to run on schedule — in our case system reboot
  8. Comment: description of the schedule, can be left blank

Everything here is straight forward except the Interval option. The format in the field for this option is HH:mm:ss (24h), but you can’t specify the full 24 hours to indicate a daily interval. The full format includes the days as nd HH:mm:ss where n is the number of days.

E.g. if we wanted a daily reboot at the same time, we’d have the interval as 1d 00:00:00 or 7d 00:00:00 for a weekly interval etc. If you’d like to reboot only once sometime in the future just leave the default value of 00:00:00.

When you have configured the schedule click OK and you’re done!

Things to consider

This approach for scheduling actions in RouterOS can be reused for other purposes as well.

When you configure an automatic reboot, you might lose your log data stored on the device depending on its storage configuration.

When the device reboots it might have incorrect local time representation until it can sync with an NTP server or acquire the correct local time otherwise. The logs might reflect the incorrect time as well until it is synced.

You probably don’t need frequent automatic rebooting for your MikroTik device unless you have a specific need. Take note of the caveats above and choose an appropriate interval based on your needs.

--

--