Read the statement by Michael Teeuw here.
modules day and time Depending represented
-
@ianperrin said in modules day and time Depending represented:
@cowboysdude said in modules day and time Depending represented:
Only thing I can see wrong is the speed [decreased] of loading the mirror!
As part of the install process,
npm install
needs to be run to install the dependency onnode-cron
. This can take a little time, but is only required once. Having completed the install, I’m not seeing the performance issues you mention so we might need to look into that a little further.No no it’s only an issue one time … after it loads the first time it’s fine thereafter :)
-
Did the git pull and it’s working to perfection… Thank you!!!
-
Now here’s a challenge for you LOL
Say you’d like a module to appear at 7 am until 8 am then again at 5pm until 11pm could it be worked so it could be set up like this:
{
module: ‘calendar’,
header: ‘US Holidays’,
position: ‘top_left’,
classes: ‘scheduler’,
config: {
// DISPLAY THE CALENDAR BETWEEN 09:00 and 18:00 ON WEDNESDAYS
schedule1: {from: ‘0 7 * * 3’, to: ‘0 8 * * 3’ },
schedule2: {from: ‘0 17 * * 3’, to: ‘0 23 * * 3’ },
calendars: [
{
symbol: 'calendar-check-o ',
url: ‘webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics’
}
]
}
},Just a thought but it could be useful :) My other thought was to enter the module twice and run it the way it’s written… going to test that :)
I tested that and that works ! :) The logic of the mirror just loads the modules [if in the config correctly] will load it as many times as you want! So I had it come on at 7 and go off at 8:30 then back on at 8:32 and that worked great! Not sure how hard it would be to change it to work but could just add another layer to the module :)
-
@cowboysdude - rather than add two instances of the module, try the following expressions:
module_schedule: {from: '0 7,17 * * *', to: '0 8,23 * * *'}
This should create a schedule with jobs to show the module at 07:00hrs and 17:00hrs, and jobs to hide the module at 08:00hrs and 23:00hrs
I can see there are use cases where multiple schedules might be required, so I’ve created an enhancement request on github to cover that one - https://github.com/ianperrin/MMM-ModuleScheduler/issues/2
-
@ianperrin Thank you! I’ll give that a go when I get home from work. This module is just about the handiest things I have seen!!!
I guess had I investigated cron I could have found that out myself… sorry.
With this I no longer wish the pi to ‘go to sleep’… I just show certain things at certain times and always leave the time and date on… it’s just amazing!!! You don’t realize how useful and important something sometimes until you have it!
Thanks again!
-
@ianperrin I installed this modules and it found working fine.
-
@shashank - great to hear - and thanks for the feedback.
-
@cowboysdude said in modules day and time Depending represented:
I guess had I investigated cron I could have found that out myself… sorry.
Glad to help and no need to apologise at all
-
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!! :)