mrxmas Posted December 28, 2011 Posted December 28, 2011 Hi I want to have a program turn on and off each day, say between 1/2/2012 and 2/15/2012! Not sure how to do it. Can any one HELP??
apostolakisl Posted December 28, 2011 Posted December 28, 2011 If this is just a one-off situation, I highly suggest you simply write the program, leave it disabled, enable on the desired date, then delete when you are done with it. Or you can disable it until you decide you want it again.
oberkc Posted December 28, 2011 Posted December 28, 2011 Apostolakkisl suggestion is quite viable and may be the easiest approach. But there are date conditions in the ISY-99 (I believe they are part of the time condition). I have two program folders for seasonal programs, winter (nov-mar) and summer (apr - oct). I use the date condition for the program folder if from 12:00 am on 1 November 2011 until 11:59 pm on 31 March 2012 then run the programs in this folder In each folder I add the programs that I want to run during the respective seasons. Each year, I simply update the conditions to reflect the new year. If I wanted to take the next step, I could create a multi-year condition: if from 12:00 am on 1 November 2011 until 11:59 pm on 31 March 2012 or from 12:00 am on 1 November 2012 until 11:59 pm on 31 March 2013 then run the programs in this folder I believe that there are even examples on the wiki where one can use a variable to reflect a date without a year, thus creating a program that would have a condition equivalent to from 1 November (any year) to 31 march (any year) But I have apparently decided that it is easier simply to change the dates each year.
apostolakisl Posted December 28, 2011 Posted December 28, 2011 I believe that there are even examples on the wiki where one can use a variable to reflect a date without a year, thus creating a program that would have a condition equivalent to from 1 November (any year) to 31 march (any year) But I have apparently decided that it is easier simply to change the dates each year. Yes, I wrote those programs. http://www.universal-devices.com/mwiki/ ... _Variables And yes, I use them for situations just like this where things recur on a schedule. I have it set up so you can have things recur on virtually any date type situation from every so many days, weeks, months, years, and so on. So, if you have a recurring situation, it might be worth the effort. But a one-off situation wouldn't make sense. You can also use ISY's date function to activate/de-activate the program on certain dates just like oberkc did above, but if you don't plan on ever using it again after the end date, you probably would want to just delete it. I do use that date function above to set all the kids school vacation days at the beginning of the year. But I have to say, it is kind of a PITA putting all those lines of code in for each vacation and I may just foget about next year and simply manually enable/disable it.
Recommended Posts