<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Stop and Start MM on a schedule]]></title><description><![CDATA[<p dir="auto">How do I get MM to Start and Stop on a schedule?<br />
I am running Bookworm 64bit  and MM v2.29<br />
This is what used to work in  buster 32bit and MM v2.15<br />
in my crontab -e</p>
<pre><code># 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
</code></pre>
<p dir="auto">It doesnt work anymore.<br />
Can someone explain why it doesnt work anymore and how to fix it.</p>
]]></description><link>https://forum.magicmirror.builders/topic/19261/stop-and-start-mm-on-a-schedule</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 14:08:06 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19261.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Dec 2024 01:15:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 04:04:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> my condolences… may his memory bring you joy.</p>
<p dir="auto">I haven’t installed unclutter in years, until last month on another system where the cursor finally bugged me… been like that for a year.</p>
<p dir="auto">I don’t know the reason for needing it, unless someone edits main.css and comments out</p>
<pre><code class="language-css">cursor:none;
</code></pre>
<p dir="auto">so, theres that…  safe travels…</p>
]]></description><link>https://forum.magicmirror.builders/post/122647</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122647</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 05 Jan 2025 04:04:59 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 04:00:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
Not sure why but unclutter was not installed.<br />
It is now and the mouse pointer went away with a reboot.<br />
This is all a fresh install in December when I loaded bookworm and 2.29 Then reloaded all the modules using your backup/restore scripts… Sure makes things easier,  for sure.<br />
Maybe you can add a check  for unclutter in your script ???<br />
I thought it was on your script page with pm2 repair and the update scripts.<br />
But did not find it there, tonight.   Could have been there,  I have not been nearly as on my game since my son passed the end of  October.  11 days after his 42nd Birthday.  I  am still a little in denial 69 days later…     It will be strange driving 10 hrs to see my Grand kids and my Daughter in law without him there to talk to ect…<br />
Sorry for the rambling.  Kind of my thing right now .  Plus my dang Computer went down and took a week to get back up.  I now have a working backup for it also…<br />
Time for me to get to bed.  We are expecting 6" to a foot of snow over the next 24 hrs…  Fun Fun Fun.</p>
]]></description><link>https://forum.magicmirror.builders/post/122646</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122646</guid><dc:creator><![CDATA[plainbroke]]></dc:creator><pubDate>Sun, 05 Jan 2025 04:00:19 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 03:33:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> for the mouse pounter, install unclutter, have to reboot after,  sometime</p>
<pre><code>sudo apt install unclutter
</code></pre>
<p dir="auto">but it SHOULD have been hidden already</p>
<pre><code>pm2 status
</code></pre>
<p dir="auto">will show you the apps</p>
<pre><code>pm2 --help 
</code></pre>
<p dir="auto">will show you all it can do (a lot!)</p>
<p dir="auto">yes, my upgrade script stops MM under pm2…</p>
]]></description><link>https://forum.magicmirror.builders/post/122645</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122645</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 05 Jan 2025 03:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 03:29:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
I think adding the user pi /home/pi/pm2 stop all<br />
worked but I am using your update script right now.<br />
So not sure which one stopped MagicMirror.<br />
The dang mouse arrow is on the screen, so I will have to find that command to hide it now…</p>
]]></description><link>https://forum.magicmirror.builders/post/122644</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122644</guid><dc:creator><![CDATA[plainbroke]]></dc:creator><pubDate>Sun, 05 Jan 2025 03:29:03 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 03:23:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> said in <a href="/post/122640">Stop and Start MM on a schedule</a>:</p>
<blockquote>
<p dir="auto">not sure yet if pm2 is working in cron?</p>
</blockquote>
<p dir="auto">has to be run as user that stored the config,. when pm2 save is done<br />
cause that info is store in the users .pm2 folder, ~/.pm2</p>
<p dir="auto">so if the cron job runs as user… oops…</p>
<p dir="auto">so you might be able to use this, a trick I have in another app…</p>
<pre><code>user=????username????
sudo -u $user pm2 start app_name or number
</code></pre>
<p dir="auto">this lets you sneak into user mode for one command</p>
<p dir="auto">so my username is sam,<br />
for example, stop my mm app</p>
<pre><code class="language-sh">sudo -u sam pm2 stop 7  
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/122643</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122643</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 05 Jan 2025 03:23:47 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 02:46:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/darreno-0" aria-label="Profile: DarrenO-0">@<bdi>DarrenO-0</bdi></a><br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/mumblebaj" aria-label="Profile: mumblebaj">@<bdi>mumblebaj</bdi></a><br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
Is there a way to run a cron job?<br />
I have done a few google searches with no results that worked.</p>
]]></description><link>https://forum.magicmirror.builders/post/122641</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122641</guid><dc:creator><![CDATA[plainbroke]]></dc:creator><pubDate>Sun, 05 Jan 2025 02:46:29 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sun, 05 Jan 2025 02:41:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mumblebaj" aria-label="Profile: mumblebaj">@<bdi>mumblebaj</bdi></a><br />
Not wanting to turn off the screen, simply because it is a pain to reach the power button to turn it back on, and no remote to get into setup of the TV it was a $40 used tv I bought.  it works but I just leave it on and stop MM with a black screen and and the bar in black with bright green letters.  It is very very dim. I am going to add the<br />
user pi and the path home/pi to the cron job and see what happens.</p>
<p dir="auto">Thanks for the links<br />
All of you.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a><br />
not sure yet if pm2 is working in cron?<br />
hoping the change will work.</p>
]]></description><link>https://forum.magicmirror.builders/post/122640</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122640</guid><dc:creator><![CDATA[plainbroke]]></dc:creator><pubDate>Sun, 05 Jan 2025 02:41:45 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Sat, 04 Jan 2025 14:04:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/darreno-0" aria-label="Profile: DarrenO-0">@<bdi>DarrenO-0</bdi></a> I would suggest having a look at the following post I created.  I use it to turn my monitor on and off at scheduled times. Not restarting the Pi though.</p>
<p dir="auto"><a href="https://forum.magicmirror.builders/topic/19116/having-trouble-with-screen-on-and-off-here-are-some-tips-that-could-help?_=1735999238062">https://forum.magicmirror.builders/topic/19116/having-trouble-with-screen-on-and-off-here-are-some-tips-that-could-help?_=1735999238062</a></p>
]]></description><link>https://forum.magicmirror.builders/post/122622</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122622</guid><dc:creator><![CDATA[mumblebaj]]></dc:creator><pubDate>Sat, 04 Jan 2025 14:04:28 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Fri, 03 Jan 2025 07:33:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> Are you running from a Pi?<br />
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.<br />
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.</p>
<p dir="auto">I don’t recall the actual command/settings I used to do it, but it was similar to :<br />
// To turn off<br />
xrandr --output HDMI-1 --off<br />
//to turn on.<br />
xrandr --output HDMI-1 --auto</p>
]]></description><link>https://forum.magicmirror.builders/post/122478</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122478</guid><dc:creator><![CDATA[DarrenO 0]]></dc:creator><pubDate>Fri, 03 Jan 2025 07:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Thu, 02 Jan 2025 12:42:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> does pm2 launch from cron?</p>
]]></description><link>https://forum.magicmirror.builders/post/122425</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122425</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 02 Jan 2025 12:42:45 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Tue, 31 Dec 2024 12:14:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> see<br />
<a href="https://serverfault.com/questions/352835/crontab-running-as-a-specific-user" target="_blank" rel="noopener noreferrer nofollow ugc">https://serverfault.com/questions/352835/crontab-running-as-a-specific-user</a></p>
]]></description><link>https://forum.magicmirror.builders/post/122345</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122345</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 31 Dec 2024 12:14:09 GMT</pubDate></item><item><title><![CDATA[Reply to Stop and Start MM on a schedule on Tue, 31 Dec 2024 12:10:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/plainbroke" aria-label="Profile: plainbroke">@<bdi>plainbroke</bdi></a> cron typically runs as root, but the pm2 info was saved under some user</p>
<p dir="auto">you can specify the username in crontab somehow</p>
]]></description><link>https://forum.magicmirror.builders/post/122342</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122342</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 31 Dec 2024 12:10:41 GMT</pubDate></item></channel></rss>