Read the statement by Michael Teeuw here.
Stop and Start MM on a schedule
-
How do I get MM to Start and Stop on a schedule?
I am running Bookworm 64bit and MM v2.29
This is what used to work in buster 32bit and MM v2.15
in my crontab -e# Turn off display Sunday - Thursday at 21h45 15 21 * * 0-4 pm2 stop all # Turn off display Friday - Saturday at 23h45 45 21 * * 5,6 pm2 stop all # Turn on screen Monday - Friday at 7h00 00 07 * * 1-5 pm2 start mm # Turn on screen Saturday - Sunday at 8h00 00 08 * * 6,0 pm2 start mm
It doesnt work anymore.
Can someone explain why it doesnt work anymore and how to fix it. -
@plainbroke cron typically runs as root, but the pm2 info was saved under some user
you can specify the username in crontab somehow
-
-
@plainbroke does pm2 launch from cron?
-
@plainbroke Are you running from a Pi?
I used to have scheduled on/off times like this and I used to turn on/off the HDMI port of the Pi at the specified times.
As the screen I had it attached to no longer detected an output source, it would then go into sleep mode until the assigned time the script enabled the HDMI interface again.I don’t recall the actual command/settings I used to do it, but it was similar to :
// To turn off
xrandr --output HDMI-1 --off
//to turn on.
xrandr --output HDMI-1 --auto