MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

MMM-ModuleScheduler skipping last two days in January??

  • I am attempting to get MMM-ModuleScheduler to display and hide various modules throughout the day. I am running this on a Pi3B+, using Buster and an up to date MM2 (v2.10.1). For some reason, the scheduler is “skipping a day” when scheduling the next event. Below is an example:

    I ran this test on Thursday 20 Jan 2020, and scheduled the MM-Xmas module to “display” for 3 minutes, starting at 16:05 and ending at 16:08. (Note I have tried this with other modules, but this one is just some lightweight CSS and good for the test.). I thought there might be an issue with currently being under daylight savings time, so I made the trigger an hour ahead just in case this was the case.

    This is the config.js:

                            module: 'MMM-Xmas',
                            position: 'fullscreen_above',
                            classes: 'scheduler',
                            config: {
                                    module_schedule: {from: '05 16 30 1 *', to: '08 16 30 1 *' }

    Here is a snippet of the mm-out.log after a fresh pm2 startup up:

    [15:03:12.282] [LOG]    Starting MagicMirror: v2.10.1
    [15:03:12.299] [LOG]    Loading config ...
    [15:03:12.309] [LOG]    Loading module helpers ...
    [15:03:28.468] [LOG]    MMM-ModuleScheduler is scheduling MMM-Xmas using "05 16 30 1 *" and "8 16 30 1 *" with dim level undefined
    [15:03:28.529] [LOG]    MMM-ModuleScheduler is hiding MMM-Xmas
    [15:03:28.538] [LOG]    MMM-ModuleScheduler has scheduled MMM-Xmas
    [15:03:28.539] [LOG]    MMM-ModuleScheduler will next show MMM-Xmas at Sat Feb 01 2020 16:05:00 GMT-0600 (Central Standard Time)
    [15:03:28.541] [LOG]    MMM-ModuleScheduler will next hide MMM-Xmas at Sat Feb 01 2020 16:08:00 GMT-0600 (Central Standard Time)

    Note the log line is @ 15:03:28 (on Jan 30). ModuleScheduler hid the MMM-Xmas module, which was the correct action as it should not have been “displayed” until 1 hour and 2 minutes later at 16:05. But then note that the next time it was scheduled to “show” the Xmas module was on “Sat Feb 01 2020 16:05:00 GMT-0600 (Central Standard Time)”.

    Why did it not schedule to first show on, Thu Jan 30 2020 16:05??
    And why did it then skip over Friday and actually schedule to show the module on Sat Feb 01 2020?? The “from” and “to” are on the same day, so worst case is it would have scheduled it on this next date in 2021?

    Interestingly enough, I did find a strange log line in mm-error.log, but no reference to what is generating it:

    [5786:1:0130/] FontService unique font name matching request did not receive a response.
    [15:03:28.471] [WARN]   Month '1' is limited to '29' days.
    [15:03:28.487] [WARN]   Month '1' is limited to '29' days.
    [5786:1:0130/] FontService unique font name matching request did not receive a response.

    Is this really some kind of bug that only occurs in “Month ‘1’”? And because today is on the 30th (past the 29th), then Scheduler can’t schedule anything until the 1st of the next month??

    (If so, what a huge coincidence that I am running this on one of the only two days in the year that error would be observed!)

    Appreciate any feedback. (And of course, come Feb 1st, we will see if everything is back to “normal”…


  • I figured it out. MMM-ModuleScheduler treats the “Month” portion of a cron schedule expression in a non-standard way. Normally January through Dec is enumerated in cron as the digits 1 through 12. But MMM-ModuleScheduler starts the first month (January) with 0 and runs though to 11 for December.

    Non-intuitive to say the least…

  • @max64 said in MMM-ModuleScheduler skipping last two days in January??:

    Non-intuitive to say the least

    No. Really intuitive.

    1st element in a list is offset 0 in computer terms.

Log in to reply