How to schedule an automatic reboot every 12-24 hours to overcome network connectivity issues?

Hi how do I schedule an automatic reboot of my Home Assistant instance every either say 12, or 24 hours? For whatever reason, that was never answered in my previous query regarding networking issues, my Home Assistant instance (on a Raspberry Pi 4) will lose network connectivity randomly every 3 - 4 days on average. (both wired and WiFi. So the only possible workaround I can come up with is to somehow schedule an automatic reboot of this nature. Unfortunately my HomeAssistant instance has not seen as much use as it probably should, due to this specific issue, but unless someone can help to directly pinpoint what the cause of the network connectivity is, I fear my HA will have little choice other than to continue to be neglected.

Of course troublshooting network connectivity issues can often be very complex and it could be easy to become lost in the woods, so if possible I would welcome it if someone could assist me in putting this workaround in place first. To be clear a reboot always resolves the issue, until the timer starts counting down again, to another period of network unavailability.

Due to this issue, despite appearing to have been around these forums for a long time, please assume my skill level when dealing with these issues to be at very novice level. I used to mess about with Linux a fair bit back in the day, but that was at least 10-15 years ago.

With warm thanks!

Have you tried? It’s there. In actions there is a reboot the host system option.

Create the triggers and condition and use the reboot action.

Yes I tried. But it just says, “Message malformed integration not found.” I’m not sure if I did something wrong? I chose 5am every morning as the time to reboot, so 05 hours 00 minutes and 00 seconds as the trigger. Then I chose ‘device’ 'Home assistant host and ‘reboot’ as the action. But all I get is this error message.

Go to Developer tools, then action, then enter “Home Assistant Supervisor: Reboot the host system.” then hit the perform action button. If it works then there’s something wrong with you YAML in the automation.

The action part of you YAML should look like this

action: hassio.host_reboot
data: {}