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.

    Module scheduling

    Scheduled Pinned Locked Moved Feature Requests
    7 Posts 4 Posters 3.8k Views 5 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.
    • yawnsY Offline
      yawns Moderator
      last edited by

      https://github.com/ianperrin/MMM-ModuleScheduler

      1 Reply Last reply Reply Quote 1
      • C Offline
        ChrisLaurie
        last edited by

        Looks like just what I want. Do you know if this is for the display part only or does it in fact stop the api calls for the info in the background when it is off?

        yawnsY 1 Reply Last reply Reply Quote 1
        • yawnsY Offline
          yawns Moderator @ChrisLaurie
          last edited by

          @ChrisLaurie
          Good question indeed. Maybe @ianperrin can enlighten us :)

          I 1 Reply Last reply Reply Quote 0
          • L Offline
            Labzz
            last edited by

            I’ve pretty much the same issue atm.

            Alot of modules running on the background and that requires many CPU usage. Is it possible to start them only if they are required and asked after the facial recognition

            1 Reply Last reply Reply Quote 0
            • yawnsY Offline
              yawns Moderator
              last edited by

              The module readme for MagicMirror shows this:

              suspend()
              
              When a module is hidden (using the module.hide() method), the suspend() method will be called. By subclassing this method you can perform tasks like halting the update timers.
              

              I am not sure if this was added with the newest update, but this should be added to modules to pause updates/requests.

              1 Reply Last reply Reply Quote 0
              • I Offline
                ianperrin @yawns
                last edited by

                As @yawns points out its down to the individual modules to implement/subclass the suspend and resume methods which in turn can be used to control when background activity is performed.

                This has been around since MM 2.0, so ModuleScheduler doesn’t make any attempt to control the functionality of the modules other than show, hide, dim and send notifications.

                Hope this helps

                "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • 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