Read the statement by Michael Teeuw here.
Auto restart MagicMirror after x hours ?
-
Hi everybody,
After 5/6 hours my screen become black and i don’t find why.
For view MM i do launch :
pm2 restart mmSo for auto restart after 5 hours, i have create a cron :
* 5 * * * pm2 restart mmdon’t work… :(
but :
pi@raspmagicmirror1:~/MagicMirror $ tail -f /var/log/syslog | grep CRON Sep 12 19:12:02 raspmagicmirror1 CRON[5590]: (root) CMD (pm2 restart mm) Sep 12 19:12:04 raspmagicmirror1 CRON[5586]: (CRON) info (No MTA installed, discarding output)So why MM don’t restart ?
Thx for help (sorry for poor english)
-
@smotx, here is a thread with a similar goal to restart from cron:
https://forum.magicmirror.builders/topic/6826/how-to-autorestart-mm-once-a-day/4 -
My cronjob looks like this:
0 6 * * * pm2 reload mmand it is working just fine. Maybe try the reload instead of the restart command?
Also, I runcrontab -ewithout sudo. -
Thanks for help.
I have installed gnome-schedule to manage from desktop mode with VNC.
-
I see your original problem. You have the cron job set to execute each day at 5am.
Here is the cron command for every five hours:
0 */5 * * * pm2 restart /home/piMagicMirror/mm.shI now have this running myself (every three hours).
Note: The leading 0 means that it will execute in the 0th minute of the hour.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login