Electronic devices comprising both hardware and software elements may sometimes not respond ideally to changes in network conditions, or changes in software or hardware configuration. This may happen due to a malfunction or bugs. Connections established at electronic devices with networking capabilities may become slow or may stop working due to various reasons. One of the reasons why connections may be broken is that Internet service providers (ISP) may change IP addresses often. This may cause the electronic device to attempt to connect to a wrong IP address or an expired IP address for establishing a connection. In such cases, restarting the electronic device is likely to fix the problem. However, in state of the art systems, restarting may require a user or administrator to be physically present in the vicinity of the electronic device if the device is not connected to any network. Therefore, methods and systems are required for automatically restarting devices when required.