Schedule Nightly Reboots

Hi! I’m using Balena Cloud to manage a deployment of RPi 3s across three locations running Screenly OSE. At one location, I’ll randomly have a device go offline on my dashboard. Our IT manager can see in the network logs that the device is on the network, and the display is still running its playlist, but I can no longer remotely access it. The solution is a manual reboot, but these things are mounted in a tricky spot, making this a bit inconvenient for the staff on site.

Is there a way to schedule nightly reboots within Balena Cloud? Not only would this correct such an issue, but it would also help with general stability for all the displays we run. Also, Linux is not my first language, so go gentle on me. :wink:


1 Like

Hello AJ,

You could use the supervisor API to reboot the device:

You could make this call within your device from a different container (if your app’s type is Microservices or Starter) or from a different process in the same container. Or it’s certainly possible to make this API call from a separate machine.

Having said these, let us know if you need our help troubleshooting the root problem that requires such nightly reboot. From your description, it sounds like that device loses connection to balencaCloud’s VPN for some reason. You need VPN connection for remote access.


For devices that need a hard power cycle to start working again. We use wifi plugs. Super hack.

1 Like

Hi there,

We are facing a problem that the scheduled reboot is sometimes not successfully. (Most of the times it goes well).

I have the following hypotheses:

  • service containers are stopped (for unknown reason). So calling the API for reboot is not possible within that container because it is stopped.
  • calling the API for reboot is possible, but the service container will not go running after being exited.

Anyway, are there alternatives to schedule a reboot for a Balena device somewhere outside the container?

Thanks in advance!

Hi Robbie, how are you scheduling your reboots? Are you using the supervisor API from inside a container on the device?

Yes @rcooke-warwick , I use the supervisor API to reboot.

I already found out that there was an extra parameter called ‘force’ that you can set on ‘true’. I also added the ‘restart:always’ in my docker-compose files for the containers.

Lets see if this will help me against my failed reboots sometimes.

Sounds good. Let us know how it goes, Robbie.

If the issue occurs again, I suggest checking the device logs around the time that reboot fails. Here’s our guide explaining the troubleshooting steps: Top 6 tips for troubleshooting your host OS with