• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Restart MagicMirror once a day

Scheduled Pinned Locked Moved Unsolved Troubleshooting
10 Posts 4 Posters 209 Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    veny
    last edited by Apr 1, 2025, 7:17 AM

    Hello everyone! I noticed that the weather module freezes and does not update. I looked at the logs, there are no errors. The command pm2 restart magicmirror helps. Is it possible to make a script so that the command pm2 restart magicmirror is executed automatically once a day. Thanks in advance to everyone!

    S M 3 Replies Last reply Apr 1, 2025, 12:06 PM Reply Quote 0
    • S Away
      sdetweil @veny
      last edited by Apr 1, 2025, 12:06 PM

      @veny pm2 can schedule restart

      https://pm2.keymetrics.io/docs/usage/restart-strategies/

      IMG_0898.png

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      R 1 Reply Last reply Apr 1, 2025, 12:18 PM Reply Quote 0
      • S Away
        sdetweil @veny
        last edited by sdetweil Apr 1, 2025, 1:25 PM Apr 1, 2025, 12:10 PM

        @veny also, weather is all in browser, so any error messages would appear in the browser developer window console

        ctrl-shift-i, select the console tab

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • R Offline
          rkorell @sdetweil
          last edited by Apr 1, 2025, 12:18 PM

          @sdetweil said in Restart MagicMirror once a day:

          pm2 can schedule restart

          Dear Sam,
          which file is called to start the mirror when I have used your install script?
          (I guess I have to insert the cron-related additions there…)

          Thanks,
          Ralf

          S 1 Reply Last reply Apr 1, 2025, 12:34 PM Reply Quote 0
          • S Away
            sdetweil @rkorell
            last edited by Apr 1, 2025, 12:34 PM

            @rkorell you can do it from the commandline, OR the config file

            the config file I create is in the installers folder
            pm2_MagicMirror.json

            it looks like you can do

            pm2 restart xx --cron-restart
            

            AFTER the app was defined already

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            R 1 Reply Last reply Apr 1, 2025, 1:21 PM Reply Quote 0
            • R Offline
              rkorell @sdetweil
              last edited by rkorell Apr 1, 2025, 1:21 PM Apr 1, 2025, 1:21 PM

              @sdetweil said in Restart MagicMirror once a day:

              @rkorell you can do it from the commandline, OR the config file

              the config file I create is in the installers folder
              pm2_MagicMirror.json

              it looks like you can do

              pm2 restart xx --cron-restart
              

              AFTER the app was defined already

              Do you mean I can issue the above command and pm2 will store/keep this as configuration?

              This would be pretty cool…
              Wasn’t there a “pm2 save” or something like this???

              Ralf

              S 1 Reply Last reply Apr 1, 2025, 1:26 PM Reply Quote 0
              • S Away
                sdetweil @rkorell
                last edited by Apr 1, 2025, 1:26 PM

                @rkorell yes, pm2 save will ‘save’ the config for use later

                this cron feature is new to me. so I haven’t tested what you need to do…
                read their doc

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                R 1 Reply Last reply Apr 1, 2025, 1:32 PM Reply Quote 1
                • R Offline
                  rkorell @sdetweil
                  last edited by Apr 1, 2025, 1:32 PM

                  @sdetweil Yupp. Have read.
                  For me it’s for later - just potential - use.
                  Currently I’m fine without daily restart.

                  Thanks for your explanation!
                  Ralf

                  S 1 Reply Last reply Apr 1, 2025, 1:37 PM Reply Quote 0
                  • S Away
                    sdetweil @rkorell
                    last edited by sdetweil Apr 1, 2025, 1:43 PM Apr 1, 2025, 1:37 PM

                    @rkorell yes, we still don’t know completely, BUT the OP asked for capability,
                    and here it is… already available in the tools we use…

                    this community thrives on contribution, and I hope others will be able to do that for this topic as well.

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      mumblebaj Module Developer @veny
                      last edited by Apr 1, 2025, 4:10 PM

                      @veny Just restarting the MM does not resolve the issue with the weather module freezing. We need to find why the weather module freezes. Maybe turn on Debug in the config and then see if there are any errors on the next freeze?

                      Check out my modules at: https://github.com/mumblebaj?tab=repositories

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      1 / 1
                      • First post
                        4/10
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy