MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Module scheduling

    Feature Requests
    4
    7
    2956
    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.
    • C
      ChrisLaurie last edited by

      The ability to set a start and end time for a specific module to load. Also for components of modules (like calendars). Then I can have some calendars/weather active for certain parts of the day. This would then reduce the number of redundant api calls to information providers. If possible scheduling should be more complex: start date, end date, days of week, start time end time etc.

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

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

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

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

            @ChrisLaurie
            Good question indeed. Maybe @ianperrin can enlighten us 🙂

            I 1 Reply Last reply Reply Quote 0
            • L
              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
              • yawns
                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
                  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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy