ianperrin / MMM-ModuleScheduler

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

"to"-field is being ignored #24

Closed Haskar closed 3 years ago

Haskar commented 4 years ago

I have this configuration:

            {
                    module: 'MMM-ModuleScheduler',
                    config: {
                            global_schedule: {from: '0 6 * * 1', to: '0 14 * * 1', groupClass: 'timetable_scheduler'},
                    }
            },

            {

                    //disabled:false,
                    module: "MMM-Timetable",
                    position: "bottom_left",
                    classes: 'scheduler',
                    config: {
                            timeFormat: "HH:mm",
                            height: "450px",
                            width: "65px",
                            mode: "5days", // "today", "5days", "7days"
                            //mode: "today",
                            refreshInterval: 1000*60,
                            displayEndTime: false, //whether display endTime on timeline or not.
                            displayPeriod: true,
                            title: null,
                            module_schedule: [
                                    {from: '0 6 * * 1', to: '0 14 * * 1'},
                                    {from: '0 6 * * 2', to: '0 14 * * 2'},
                                    {from: '0 6 * * 3', to: '0 14 * * 3'},
                                    {from: '0 6 * * 4', to: '0 14 * * 4'},
                                    {from: '0 6 * * 5', to: '0 14 * * 5'}
                            ],
                            //classes: 'timetable_scheduler',
                            schedules: [{
                                    title: "Jennys Stundenplan",
                                    file: "jenny.csv" // or "test.csv" - comma separated text file. (see `test.csv`)
                            },]
                    }
            },

It seems like the module ignores the "to"-field completely during "runtime" but not if I restart the mirror itself. The problem started to occur a few weeks/months ago (I didn't really notic it until recently)

I have also tried {from: '0 6 1-5', to: '0 14 1-5'} with no success.

Is this a problem with the MMM-ModuleScheduler or MMM-Timetable or a combination of both? I don't know ...

ianperrin commented 3 years ago

@Haskar Did you ever solve this issue?

If not, can you try removing the global_schedule entirely and using the following module_schedule in the config for the MMM-Timetable module

module_schedule: [
        {from: '0 6 * * 1-5', to: '0 14 * * 1-5'}
],

This should show the MMM-Timetable module at 06:00 on every day-of-week from Monday through Friday, then hide it at 14:00 on every day-of-week from Monday through Friday.

If you're still having issues, please re-open the issue and share the output from the log (removing any sensitive information before posting!)

Haskar commented 3 years ago

never soled this issue. I removed this part now and see if it fixes anything :) module_schedule: [ {from: '0 6 * * 1-5', to: '0 14 * * 1-5'} ], It's hard to check now. I will add some scheduling during the weekend to find out if it changed anything. Thx for the reply :)