• 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.

Module scheduling

Scheduled Pinned Locked Moved Feature Requests
7 Posts 4 Posters 3.5k 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.
  • C Offline
    ChrisLaurie
    last edited by Jan 3, 2017, 4:42 AM

    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
    • Y Offline
      yawns Moderator
      last edited by Jan 3, 2017, 5:13 AM

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

      1 Reply Last reply Reply Quote 1
      • C Offline
        ChrisLaurie
        last edited by Jan 3, 2017, 5:22 AM

        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?

        Y 1 Reply Last reply Jan 3, 2017, 9:45 AM Reply Quote 1
        • Y Offline
          yawns Moderator @ChrisLaurie
          last edited by Jan 3, 2017, 9:45 AM

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

          I 1 Reply Last reply Jan 3, 2017, 4:12 PM Reply Quote 0
          • L Offline
            Labzz
            last edited by Jan 3, 2017, 10:42 AM

            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
            • Y Offline
              yawns Moderator
              last edited by Jan 3, 2017, 4:04 PM

              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 Jan 3, 2017, 4:12 PM

                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
                1 / 1
                • First post
                  5/7
                  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