How to setup repeating hourly schedule (not exact hour)?

I know how to setup hourly schedule with PLEG that is true every hour (12:00, 13:00, etc), but how to setup schedule that is triggered e.g. 5 minutes past every hour? E.g. 12:05, 13:05, 14:05 etc

Move your scheduled action to instead be a delayed action, and set the offset using that?

Are you using PLEG?

yep (I thought it was clear as I was posting to this forum, but anyway updated my original post to mention PLEG…)

Yeah sorry, I surf forums by “unread” posts not category. Disregard :slight_smile:

Sorry, I didn’t pay attention to what forum it was in. :slight_smile: Easiest way would be to just use the hourly schedule you already know how to do a use LUA to insert a 5 minute delay. You could also use PLTS as 5 minute delay (might be the better option). There’s probably a way to do it straight from the PLEG schedule but I’d have to really dig into it. My instinct is to use the hourly timer as part of the trigger and use it to trigger another sequence to fire 5 minutes later. Sounds convoluted (and likely is) but it’s likely more efficient than a wait in LUA. Are you familiar with how to get an event to trigger after a preset amout of time?

(!tPatioDoorClosed and !tPatioDoorLocked and (!tPatioDoorClosed; Now > 5:00))

This trigger is used to set off certain events after the door has been left open for 5 minutes. It could easily be modified to catch your schedule event changing state, wait five minutes and then fire the event you wish to use. This also seems to be the standard method of doing delays. Please forgive my scattered thoughts, I’ve been out working in the yard and I’m kinda fried…

[quote=“Mike Yeager, post:6, topic:199123”]… Are you familiar with how to get an event to trigger after a preset amout of time?

(!tPatioDoorClosed and !tPatioDoorLocked and (!tPatioDoorClosed; Now > 5:00))

This trigger is used to set off certain events after the door has been left open for 5 minutes. It could easily be modified to catch your schedule event changing state, wait five minutes and then fire the event you wish to use. This also seems to be the standard method of doing delays. Please forgive my scattered thoughts, I’ve been out working in the yard and I’m kinda fried…[/quote]

Thanks for the idea, I think I’ll try the following syntax:

Input trigger:
sHourly hourly schedule, On Type: interval, every 01:00:00, Off Type: interval, after 00:01:00

Conditions:
cSomeCondition sHourly
cOtherCondition (cSomeCondition; Now > 05:00)

I believe you’ll find you can roll it into one once you get it working. How does your hourly task fire? If it goes true for one minute, test for the false condition being greater than 4 minutes old. Could enev test it more than 4 and less than 6 to prevent duplicate events in case of a restart. Get creative and play a bit. None of this ever works first shot unless you’ve learned from MANY mistakes…

Yes, to be exact, cOtherCondition should be “(cSomeCondition; Now > 04:00)” as hourly schedule is true for one minute. Seems to work fine, but I’ll add some exception handling if necessary :smiley:

I wasn’t exactly sure how you had it set up. I’m also not sure how it will react in case of a restart, but you’ll figure it out. :slight_smile:

Another (more efficient) approach is to create a timer that runs every hour (PLEG snaps this to the current hour as you have already detected) but then set it’s OFF time as an interval of 5 minutes.

Then add your logic to when the timer becomes false.

Input Schedule:
HourTimer …

Condition
FiveAfter !HoutTimer

Thought about that as well. Wasn’t certain it would work that way…