<?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[PM2 restart question (more of a linux question than MM)]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I’m trying to restart my mirror nightly with “pm2 restart mm” using a cron job. I’ve tried everything I can think of or find online but nothing works. I’ve created python and bash scripts, used the system crontab and the user crontab. I’ve tried it with and without “sudo” and also running it under the “pi” user. It always works interactively at the command line but not via crontab.  Any suggestions?</p>
<p dir="auto">Also, I saw the warning post about the April 1st upgrade and Pi Zero W. Does that also  apply to the Zero 2W?</p>
]]></description><link>https://forum.magicmirror.builders/topic/20139/pm2-restart-question-more-of-a-linux-question-than-mm</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 11:43:44 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/20139.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Mar 2026 17:31:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 27 Apr 2026 22:20:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thartley" aria-label="Profile: thartley">@<bdi>thartley</bdi></a> – Follow Sam’s instructions.</p>
<p dir="auto">I am traveling so didn’t get to finish mine. I got to a point where I got a message that the action was in progress, but it would never finish. After some research I’m pretty sure I have a permission problem and will check it out when I get home in a couple of weeks.</p>
]]></description><link>https://forum.magicmirror.builders/post/130892</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130892</guid><dc:creator><![CDATA[JohnGalt]]></dc:creator><pubDate>Mon, 27 Apr 2026 22:20:59 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Wed, 24 Jun 2026 11:06:22 GMT]]></title><description><![CDATA[<p dir="auto">if your NAS is Synology, like mine<br />
create a shared folder using the Control Panel, Shared folder function<br />
<img src="/assets/uploads/files/1777324058465-screenshot-at-2026-04-16-15-47-17.png" alt="Screenshot at 2026-04-16 15-47-17.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">make sure the permissions are set for whatever user will be accessing it (here sam for me)<br />
<img src="/assets/uploads/files/1777324073918-screenshot-at-2026-04-16-15-47-32.png" alt="Screenshot at 2026-04-16 15-47-32.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">you should be able to see this share on a Windows or Mac system</p>
<p dir="auto">now you need to enable access from the PI/linux this takes 2 steps</p>
<ol>
<li>create a folder of some name in the /media folder,<br />
this will require sudo</li>
</ol>
<pre><code>     sudo mkdir /media/xxx 
</code></pre>
<ol start="2">
<li>create an entry in the /etc/fstab file<br />
this will require sudo</li>
</ol>
<pre><code class="language-sh">     sudo nano /etc/fstab 
</code></pre>
<p dir="auto">here is mine for the media folder above</p>
<pre><code>//192.168.2.32/media /media/xxx cifs username=sam,password=xxxxxxx,iocharset=utf8,file_mode=0777,dir_mode=0777 
</code></pre>
<p dir="auto">//NAS_ipaddress/shared_name local_system_folder (from step1),</p>
<p dir="auto">set the username and password required to access this share (as defined in your nas)<br />
save the fstab entry ctrl-o, ctrl-x<br />
now mount the folder</p>
<pre><code>sudo mount -a 
</code></pre>
<p dir="auto">then look at the mounted folder</p>
<pre><code>ls /media/xxx 
</code></pre>
<p dir="auto">(from step 1) you should see the files listed from the shared folder</p>
<p dir="auto">from now on, when the system boots up, it will automount this share.<br />
if the nas is down, or something causes lost connection, do</p>
<pre><code>sudo mount -a
</code></pre>
<p dir="auto">again to reconnect</p>
<p dir="auto">now, for the MMM-ImagesPhotos step<br />
it uses a hard coded folder for the images</p>
<pre><code> MMM-ImagePhotos/uploads
</code></pre>
<p dir="auto">we need to make that point to the mounted folder<br />
so,<br />
rename the folder out of the way</p>
<pre><code>cd ~/MagicMirror/modules/MMM-ImagePhotos
mv uploads old_uploads
</code></pre>
<p dir="auto">now create a link , need sudo for this , still in the MMM-ImagesPhotos folder</p>
<pre><code>sudo ln -s /media/xxx uploads
</code></pre>
<p dir="auto">note: if the folder of images you want to display is somewhere other than that root of the server share<br />
just add the path to the folder , like this, where folder1 and folder2 are subfolders on the share<br />
sudo ln -s /media/xxx/folder1/folder2 uploads</p>
<p dir="auto">then check it</p>
<pre><code>ls uploads
</code></pre>
<p dir="auto">you should see the same output as in the end of step 2 above</p>
<p dir="auto">now MMM-ImagePhotos will pull images from the mounted and linked share from your nas (file server…)</p>
]]></description><link>https://forum.magicmirror.builders/post/130891</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130891</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 24 Jun 2026 11:06:22 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 27 Apr 2026 21:06:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thartley" aria-label="Profile: thartley">@<bdi>thartley</bdi></a> see instructions, next message</p>
<p dir="auto">The trick is MMM-ImagesPhotos uses a fixed folder name, uploads, do you have to create a link from that to your mounted file share</p>
<p dir="auto">Using the ln command</p>
]]></description><link>https://forum.magicmirror.builders/post/130886</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130886</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 27 Apr 2026 21:06:47 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 27 Apr 2026 17:03:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johngalt" aria-label="Profile: JohnGalt">@<bdi>JohnGalt</bdi></a>  Hello. I have the same issue not being able to  map to a NAS drive using the Terminal commands. I can map to the drive using the Files GUI. I couldn’t get it to work either - the problem seems to between my chair and the keyboard. Even though I got it to map with the FM, I still couldn’t get the MMM_ImagesPhotos module to access the NAS, which in my case is a USB flash drive on my Windows router USB port. I didn’t test to see if the drive letter is persistent between reboots/power failures. -Thanks</p>
]]></description><link>https://forum.magicmirror.builders/post/130885</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130885</guid><dc:creator><![CDATA[thartley]]></dc:creator><pubDate>Mon, 27 Apr 2026 17:03:45 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Thu, 16 Apr 2026 16:16:04 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> --Hi Sam</p>
<p dir="auto">That was a while ago and my memory is foggy, but the issue was mapping a share on my NAS to the Raspberry Pi on which the MM is running…</p>
<p dir="auto">As best I recall, I tried following directions to map the drive, but it didn’t work. I seem to recall being left with the sense that the process [a] had changed over time due to changes in distributions, and/or [b] that there was something left out of the directions that were likely too obvious to mention for someone who already knew, but was non-obvious to someone out of the know.  At that point I gave up.</p>
<p dir="auto">Fast forward to today - I’m happy to invest the time to learn and get it done if you’re willing to help!! I appreciate it. I sent you an email regarding how to best proceed.</p>
]]></description><link>https://forum.magicmirror.builders/post/130806</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130806</guid><dc:creator><![CDATA[JohnGalt]]></dc:creator><pubDate>Thu, 16 Apr 2026 16:16:04 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Tue, 14 Apr 2026 00:57:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johngalt" aria-label="Profile: JohnGalt">@<bdi>JohnGalt</bdi></a> what didn’t work? , glad to help if you want to try agsin</p>
]]></description><link>https://forum.magicmirror.builders/post/130788</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130788</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 14 Apr 2026 00:57:26 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 13 Apr 2026 17:57:11 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> – Well, I’m not surprised. I have the pictures on a USB drive attached to the raspberry pi, and the more pictures on the drive the worse it gets. It does feel like the software is loading up memory with the pictures.</p>
<p dir="auto">I tried some time ago pulling the pictures from a share on my NAS, (you had advised someone to do that on another thread) but I never got that to work.</p>
<p dir="auto">Thanks for letting us know about the memory issue.</p>
]]></description><link>https://forum.magicmirror.builders/post/130779</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130779</guid><dc:creator><![CDATA[JohnGalt]]></dc:creator><pubDate>Mon, 13 Apr 2026 17:57:11 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 13 Apr 2026 17:43:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johngalt" aria-label="Profile: JohnGalt">@<bdi>JohnGalt</bdi></a> someone else has reported an out of memory w that module on discord</p>
]]></description><link>https://forum.magicmirror.builders/post/130778</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130778</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 13 Apr 2026 17:43:40 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 13 Apr 2026 17:38:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wyovino" aria-label="Profile: wyovino">@<bdi>wyovino</bdi></a> – Ok, good to know.</p>
<p dir="auto">One of my magic mirrors stops every few days. There is only one module running on that mirror, MMM-BackgroundSlideshow, so it’s obvious when it happens.</p>
]]></description><link>https://forum.magicmirror.builders/post/130777</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130777</guid><dc:creator><![CDATA[JohnGalt]]></dc:creator><pubDate>Mon, 13 Apr 2026 17:38:35 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Mon, 13 Apr 2026 14:57:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johngalt" aria-label="Profile: JohnGalt">@<bdi>JohnGalt</bdi></a> My mirror was sometimes stalling - falling to update even the clock.</p>
]]></description><link>https://forum.magicmirror.builders/post/130775</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130775</guid><dc:creator><![CDATA[wyovino]]></dc:creator><pubDate>Mon, 13 Apr 2026 14:57:44 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Sat, 11 Apr 2026 16:41:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wyovino" aria-label="Profile: wyovino">@<bdi>wyovino</bdi></a></p>
<p dir="auto">Bill, I’m glad you found what you were looking for.</p>
<p dir="auto">I’m curious - what issue are you addressing by restarting the MagicMirror daily?</p>
<p dir="auto">I read this thread with interest because I too have thought about resorting to daily restarts on one of my mirrors. [I’ve figured out that daily restarts won’t meet my needs / fix my problem - so I haven’t gone down that road (yet).  I guess I could design a cron schedule that staggers the restart enough that the photo display doesn’t show the same pictures every day, but not yet…]</p>
]]></description><link>https://forum.magicmirror.builders/post/130763</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130763</guid><dc:creator><![CDATA[JohnGalt]]></dc:creator><pubDate>Sat, 11 Apr 2026 16:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Thu, 05 Mar 2026 18:10:32 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></p>
<p dir="auto">Got it!</p>
<p dir="auto">In the user crontab:</p>
<p dir="auto">30 2 * * * /usr/local/bin/node     /usr/local/bin/pm2 restart mm</p>
<p dir="auto">Restarts the mirror every day at 2:30 am local time.</p>
<p dir="auto">As always, thanks for your quick response!</p>
<p dir="auto">Bill</p>
]]></description><link>https://forum.magicmirror.builders/post/130259</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130259</guid><dc:creator><![CDATA[wyovino]]></dc:creator><pubDate>Thu, 05 Mar 2026 18:10:32 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Thu, 05 Mar 2026 17:42:04 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wyovino" aria-label="Profile: wyovino">@<bdi>wyovino</bdi></a> <a href="/post/130255">said</a>:</p>
<p dir="auto">I saw the warning post about the April 1st upgrade and Pi Zero W</p>
</blockquote>
<p dir="auto">no… pi02w is an armv7l processor, pi3 in pi0w physical shape…</p>
]]></description><link>https://forum.magicmirror.builders/post/130257</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130257</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 05 Mar 2026 17:42:04 GMT</pubDate></item><item><title><![CDATA[Reply to PM2 restart question (more of a linux question than MM) on Thu, 05 Mar 2026 17:41:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wyovino" aria-label="Profile: wyovino">@<bdi>wyovino</bdi></a> using the user’s crontab from when the job was defined is the most important</p>
<p dir="auto">so</p>
<p dir="auto">crontab -e<br />
(no sudo)</p>
<p dir="auto">and then you would look in the /var/logs folder for the syslog file</p>
<p dir="auto">and should find a  logs entry for the CRON task execution</p>
<pre><code class="language-text">Mar  1 07:30:01 sams CRON[2992838]: (root) CMD ([ -x /etc/init.d/anacron ] &amp;&amp; if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start &gt;/dev/null; fi)
Mar  1 07:30:01 sams CRON[2992839]: (sam) CMD (sshpass -f /home/sam/.idsync sudo rsync ....
</code></pre>
<p dir="auto">it might tell you what is happening to the prior cron jobs. (mine above is rsync just for demonstration)</p>
<p dir="auto">pm2 might already have cron support</p>
<pre><code>Using the --cron-restart Option
This feature is used to ensure an application, which is intended to run continuously, is refreshed on a regular schedule. 
Command Line:
bash
pm2 start xxxx --cron-restart "0 0 * * *"
</code></pre>
<p dir="auto">pm2 save</p>
]]></description><link>https://forum.magicmirror.builders/post/130256</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/130256</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 05 Mar 2026 17:41:18 GMT</pubDate></item></channel></rss>