ianperrin / MMM-ModuleScheduler

A MagicMirror helper module to schedule the display of modules and sending of notifications.
MIT License
99 stars 13 forks source link

global_schedule running during 2 month time span #38

Closed saidbob2852 closed 6 months ago

saidbob2852 commented 2 years ago

i want to run a simple fall and winter effect. (MMM-snow) during that season. but cannot seem to get the to and from time correct. i commented out the "cold" since once i can get one i can figure out the other. the current date is aug 29. i tried a ton a variation.

{from:'* * * 9-11 *', to: '* * * 9-11 *', groupClass: 'fall'}, //result: doesn't run 
{from:'* * * 8 *', to: '* * * 11 *', groupClass: 'fall'}, //result: doesn't run 
{from:'0 1 1 8 *', to: '0 23 30 11 *', groupClass: 'fall'}, //results: doesn't run 

i was able to get my "weekday_morning' to run so i though i knew what i was doing .

code below :

    modules: [  

        {
            module: "MMM-ModuleScheduler",
            config:{
                global_schedule:[
                    {from:'30 5 * * 1-5', to: '0 8 * * 1-5', groupClass: "weekday_morning"},
                    {from:'* * 28 8 *', to: '* * 30 11 *', groupClass: 'fall'},
                    //{from:'* * * 12,1 *', to: '* * *  12,1 *', groupClass: "cold"}
                    ],  
            },
        //{
            //module: "MMM-Snow",
            //position: "fullscreen_above",
            //classes: "cold",
            //config:{ 
                //flakecount: 50,
                //theme:  "winter"  
            //  },          
        //},
        {
            module: "MMM-Snow",
            position: "fullscreen_above",
            classes: "fall",
                config:{ 
                flakecount: 50,
                theme:  "fall"  
                },          
        },
],
ianperrin commented 2 years ago

Hi @saidbob2852

I’m away from my MagicMirror at the moment, so can’t be sure exactly what the issue is, but here’s a few comments/thoughts to see if we can find out more.

  1. Try to make sure all cron expressions are valid. You can test them using crontab.guru
  2. When using multiple expressions, make sure they are compatible. The module doesn’t validate whether the expressions you enter in the config conflict with one another so this can cause issues
  3. If you are only wanting to use a schedule to control the display of one module, use the module_schedule option rather than global_schedule
  4. Set debug: true, in the config for MMM-ModuleScheduler and review the log files. You should see entries in the logs stating when MMM-ModuleScheduler will next hide and show/dim the specified modules

if the output in the log is unexpected, post a copy of the config and the log output here so we can take a look. Be sure to remove any sensitive info first ;)