Read the statement by Michael Teeuw here.
Cronjob doesn't work with my MM
-
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
SHELL=/bin/bash0 20 * * * pm2 stop mm
0 6 * * 1-5 pm2 start mm -
@chassain-0 i tried your solution but still not work, same with pm2 stop/start MagicMirror
@sdetweil with this cron
44 18 * * * pi pm2 start MagicMirror > pm2 status 0
or
46 18 * * * pi pm2 start MagicMirror > pm2 info 0i had a log in pi folder at the same time but a blank log
I tested my cron with a simple Hello word .py and cronjob works.
have you an other solution ?
-
@MisterT pm2 is a big node application, so if needs to be in the right folder and process
-
Hello MisterT
I’m not an expert, I’m more of a beginner, but I tried to use a cronjob to stop and start the mirror on my mirror.10 23 * * * pm2 stop mm> / dev / null 2> & 1
15 23 * * * pm2 start mm> / dev / null 2> & 1
it worked for me.
I use the MagicMirror² v2.11.0 and NAME = “Raspbian GNU / Linux”
VERSION_ID = “10”
VERSION = “10 (buster)”
VERSION_CODENAME = buster.
With older versions of the software I always had problems starting MagicMirror because of access violations with pm2 after a reboot.
Maybe this will help you solve your problem. -
Allow me to deliver a gentle reminder to use the markdown features of the forum when posting code and logs.
-
Hi it’s me again
So i made a fresh installation of raspbian buster and latest version of Magic mirror. I used the auto install from @sdetweil . At the end of autoinstall, a message appears and says: Do you want use pm2 to autostart your mirror?
So i pressed yes.
After this i restart my Magic mirror but it didn’t start with raspbian.I try my cronjob in crontab-e but nothing happen
SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 01 00 * * * pi pm2 restart MagicMirror 00 08 * * * pi pm2 restart MagicMirror 10 16 * * * pi pm2 stop MagicMirrordoes this command line can resolve my problem from @sdetweil git script?
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"Thx for next answers
-
@MisterT i have seen this a couple times… not sure why,
run the fixuppm2.sh script from my repo and see if that fixes the problem
one line to copy/paste
-
@sdetweil i apply your command line and magic mirror starts with raspbian. I’ll come back if i have problems with my crontab
Thx -
This post is deleted! -
I it working now for you? :)
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