I'm trying to figure out a way to have an event run every fourth Thursday evening. I suppose if I could have an event run every 28 days and start on a Thursday and that would work as well. How is this best accomplished? Thanks!
Announcement
Collapse
No announcement yet.
Event to run every 4th Thursday
Collapse
X
-
Originally posted by zwolfpack View PostHow about this: create a counter, call it "Week". Then create two events something like these. Add the desired actions to the 2nd event.
The counter increments each Thursday at 6PM. When the counter reaches a multiple of 4 it triggers the 2nd event.
Modify the first event to run at 1:00 AM on Monday. (This event just counts weeks.)
Trigger the second event at your desired time, with the conditions that 1) the day is Thursday, and 2)the week counter is 4 or a multiple of 4.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
Originally posted by S-F View PostPost #3 has the solution.
Counters and timers can become a PITA FAST! My personal philosophy is to avoid if possible.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
Originally posted by S-F View PostGads! Counters? Post #3 has the solution. Counters and timers can become a PITA FAST! My personal philosophy is to avoid if possible.
The only way I can think of running it on every 4th Thursday is with a counter and at least 2 events.
It would have to be set up just right to trigger on the first Thursday, then it would continue reliably, unless HomeSeer is down at one of the trigger times. If it misses a trigger, it will be out of sync from then on without intervention.Last edited by randy; April 30, 2017, 10:43 AM.HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon
Comment
-
Originally posted by rprade View PostI agree, but I think the OP wants the event to run every 4th Thursday, not the 4th Thursday in each month. Post #3 is for the 4th Thursday of each month, making the event run 5 weeks apart every 2-3 months.
The only way I can think of running it on every 4th Thursday is with a counter and at least 2 events.
[ATTACH]60927[/ATTACH]
It would have to be set up just right to trigger on the first Thursday, then it would continue reliably, unless HomeSeer is down at one of the trigger times. If it misses a trigger, it will be out of sync from then on without intervention.Billy
Comment
-
Originally posted by cowinger View PostIf it needs to run every 4 weeks on a Thursday then what about this way.HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon
Comment
-
Right! Every 4 weeks. Yeah, I can't think of any way to do it without a counter and multiple events either. It's the need for multiple events to clean up counters and timers that I don't like. It gets convoluted.Originally posted by rpradeThere is no rhyme or reason to the anarchy a defective Z-Wave device can cause
Comment
-
Well I would just do this with a simple script. Just run it at a set time every day:
Code:Sub Main(ByVal Parm As Object) Dim DOW As Integer = DateTime.Today.DayOfWeek Dim Day As Integer = DateTime.Today.Day If Day >= 22 And Day <= 28 Then If DOW = 4 Then hs.TriggerEvent("MyEvent") End If End Sub
Comment
-
Originally posted by jon00 View PostWell I would just do this with a simple script.
Does this script find the 4th Thursday of the month? It doesn't look like it finds every 4th Thursday.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
Comment