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.

    Stop and Start MM on a schedule

    Scheduled Pinned Locked Moved General Discussion
    13 Posts 4 Posters 2.4k 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.
    • plainbrokeP Offline
      plainbroke @mumblebaj
      last edited by

      @mumblebaj
      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
      user pi and the path home/pi to the cron job and see what happens.

      Thanks for the links
      All of you.

      @sdetweil
      not sure yet if pm2 is working in cron?
      hoping the change will work.

      Slow learner. But trying anyways.

      plainbrokeP S 2 Replies Last reply Reply Quote 0
      • plainbrokeP Offline
        plainbroke @plainbroke
        last edited by

        @DarrenO-0
        @mumblebaj
        @sdetweil
        Is there a way to run a cron job?
        I have done a few google searches with no results that worked.

        Slow learner. But trying anyways.

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @plainbroke
          last edited by

          @plainbroke said in Stop and Start MM on a schedule:

          not sure yet if pm2 is working in cron?

          has to be run as user that stored the config,. when pm2 save is done
          cause that info is store in the users .pm2 folder, ~/.pm2

          so if the cron job runs as user… oops…

          so you might be able to use this, a trick I have in another app…

          user=????username????
          sudo -u $user pm2 start app_name or number
          

          this lets you sneak into user mode for one command

          so my username is sam,
          for example, stop my mm app

          sudo -u sam pm2 stop 7  
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          plainbrokeP 1 Reply Last reply Reply Quote 0
          • plainbrokeP Offline
            plainbroke @sdetweil
            last edited by

            @sdetweil
            I think adding the user pi /home/pi/pm2 stop all
            worked but I am using your update script right now.
            So not sure which one stopped MagicMirror.
            The dang mouse arrow is on the screen, so I will have to find that command to hide it now…

            Slow learner. But trying anyways.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @plainbroke
              last edited by sdetweil

              @plainbroke for the mouse pounter, install unclutter, have to reboot after, sometime

              sudo apt install unclutter
              

              but it SHOULD have been hidden already

              pm2 status
              

              will show you the apps

              pm2 --help 
              

              will show you all it can do (a lot!)

              yes, my upgrade script stops MM under pm2…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              plainbrokeP 1 Reply Last reply Reply Quote 0
              • plainbrokeP Offline
                plainbroke @sdetweil
                last edited by

                @sdetweil
                Not sure why but unclutter was not installed.
                It is now and the mouse pointer went away with a reboot.
                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.
                Maybe you can add a check for unclutter in your script ???
                I thought it was on your script page with pm2 repair and the update scripts.
                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…
                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…
                Time for me to get to bed. We are expecting 6" to a foot of snow over the next 24 hrs… Fun Fun Fun.

                Slow learner. But trying anyways.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @plainbroke
                  last edited by

                  @plainbroke my condolences… may his memory bring you joy.

                  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.

                  I don’t know the reason for needing it, unless someone edits main.css and comments out

                  cursor:none;
                  

                  so, theres that… safe travels…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 2 / 2
                  • First post
                    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