• 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 Refresh at Midnight

Scheduled Pinned Locked Moved Development
7 Posts 2 Posters 1.0k Views 2 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.
  • J Offline
    jmwyds @sdetweil
    last edited by Aug 14, 2020, 2:31 AM

    @sdetweil Correct, yes. Merriam Webster by default supplies a list of 5 or so Words of the Day. By grabbing the first element, I am grabbing the first word with it’s definition, sentence, part of speech, etc.
    Do you see me doing something else there?

    S 1 Reply Last reply Aug 14, 2020, 2:38 AM Reply Quote 0
    • S Offline
      sdetweil @jmwyds
      last edited by Aug 14, 2020, 2:38 AM

      @jmwyds well, u said it didn’t work, with the current timing.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      J 1 Reply Last reply Aug 14, 2020, 3:11 AM Reply Quote 0
      • J Offline
        jmwyds @sdetweil
        last edited by Aug 14, 2020, 3:11 AM

        @sdetweil Ah, I’m sorry about that Sam. The module does work! The only thing that doesn’t work is that it doesn’t refresh itself at midnight like I want it to. If I do a restart of the mirror it pulls the word and it’s properties correctly. So I was hoping that you or someone else might have some expertise on that update interval aspect

        Thanks!
        Jack

        S 1 Reply Last reply Aug 14, 2020, 3:16 AM Reply Quote 0
        • S Offline
          sdetweil @jmwyds
          last edited by Aug 14, 2020, 3:16 AM

          @jmwyds so, use the moment() class to calculate the number of milliseconds until u want the next word, and use that as the timer interval, then sendSocketNotification to the node_helper like u do at start time, to get the next word.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Aug 14, 2020, 3:18 AM Reply Quote 0
          • S Offline
            sdetweil @sdetweil
            last edited by sdetweil Aug 14, 2020, 1:18 PM Aug 14, 2020, 3:18 AM

            @jmwyds or
            millis in a day is

             24*60*60*1000
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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