Read the statement by Michael Teeuw here.
modules day and time Depending represented
-
Not implemented this yet @ianperrin , but this is an incredible contribution. We can make much more use of the modules now, rather than being limited to a certain number
-
@Mitchfarino said in modules day and time Depending represented:
Not implemented this yet @ianperrin , but this is an incredible contribution. We can make much more use of the modules now, rather than being limited to a certain number
This should be right in the install!! :)
-
WORKS FINE! Thanks!
-
@shashank i configured this scheduler today with Calendar and Wunderground, after the end time the module will not disappear, i need to stop and start the MM.
{
module: ‘calendar’,
header: ‘US Holidays’,
position: ‘top_left’,
classes: ‘scheduler’,
config: {
// DISPLAY THE CALENDAR BETWEEN 09:00 and 18:00 ON WEDNESDAYS
module_schedule: {from: ‘0 9 * * FRI’, to: ‘20 21 * * SAT’ },
calendars: [
{
symbol: 'calendar-check-o ',
url: ‘webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics’
}
]
}
}, -
@shashank said in modules day and time Depending represented:
Looking at your config, I can see a couple of potential issuesFirstly, make sure you use straight apostrophes (
'
) not curly ones (‘ ’
).Secondly, the expressions in the
module_schedule
config option (module_schedule: {from: '0 9 * * FRI', to: '20 21 * * SAT' },
) should schedule the calendar so it is displayed at 09:00 on Friday and be hidden at 21:20 on Saturday.Is this what you intended? If so, check the logs (
pm2 logs mm
), you should see something like this.MMM-ModuleScheduler received CREATE_MODULE_SCHEDULE MMM-ModuleScheduler is scheduling calendar using '0 9 * * FRI' and '20 21 * * SAT' MMM-ModuleScheduler has scheduled calendar MMM-ModuleScheduler will next show calendar at Fri Sep 23 2016 09:00:00 GMT+0000 (UTC) MMM-ModuleScheduler will next hide calendar at Sat Sep 17 2016 21:20:00 GMT+0000 (UTC)
Note the last two lines will vary depending on when start the mirror. In the example above started the mirror at 17:00 on Saturday, so the next ‘show’ (
from
) date is next friday (23rd) and the next hide (to
) date is tonight.Hope this helps
-
Sorry for the odd question, will this work on a windows PC?
I’m testing the mirror on the PC before I deploy to my Pi, and this module doesn’t seem to be working
-
@Mitchfarino I’ve not tested the module on windows myself, so I can’t say for sure.
The module requires the cron package so make sure this has been installed by running
npm install
from the module folder.You could then check whether
cron
works on windows by entering the following from the command promptcd MagicMirror/modules/MMM-ModuleScheduler node
Once the node prompt appears, enter the following
var CronJob = require('cron').CronJob; var testJob = new CronJob({cronTime: '* * * * * *', onTick: function() { console.log('Firing every second'); }, onComplete: function() { console.log('Stopping'); }, start: true}); console.log('Scheduled for ' + testJob.nextDate().toDate());
You should see a telling you when the module is next scheduled for and another message every second the expression is fired (press
CTRL-C
twice to stop!)If we’ve got this far cron is working successfully. What do the logs (
pm2 logs mm
) say? Could you post your config options?