Read the statement by Michael Teeuw here.
Schedule reboot of Pi or MagicMirror
-
Hey!
Been looking around for an option to get my Pi to restart once a day or at least get my MM restarting once a day. There seems to be an issue where some modules wont update unless i reboot MM. For example Google Calendar.
There is a lot of guides out there, but i simply cant get it to work. Most of them are really old, so i guess they are outdated or maybe I´m doing it wrong :)
Anyhow,What would be the easiest way to get my PI or MM to have a schedules restart once a day?
Running a Raspberry Pi 3b+ withThanks for the support!
-
@Bobba86 crontab is the typical way to do this
it takes a control file with a line for each eventI would make sure to call the
reboot
command as root
or the
pm2 restart MagicMirror
command as the user -
-
I have mine set up with a Python script to do a reboot and invoke it with crontab. As far as the television monitor is concerned, I use a Sonoff S31 and programmed it to shut down and turn on at certain times.
#! /usr/bin/env python3
#Shutdown.py
#Do the actual reboot
os.system(‘sudo shutdown now’) -
@Exndfan I have something like the same - except mine was remote control so I could control it through my smart home. Still gotta get that set up again.