period time triggers with now and endtime #714
-
I want to use a period time trigger that starts at definition time and ends at a specified time but the function still triggers even after the time has passed.
When I specify a specific time as the start time it works.
It also works when the end time includes the date
This might be a bug but I wanted to ask here first just in case I am doing something wrong. This is the function I used to test this.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You're not doing anything wrong. I don't think it's a bug, but an unexpected consequence of how
Hmm - I just tested the 2nd suggestion, and it doesn't work correctly - it triggers once at |
Beta Was this translation helpful? Give feedback.
I've thought about this some more and the current beahvior doesn't seem right, so I consider this a bug. I've updated the time trigger logic to address the issues you raised. Now if you specify
period(now, 1 hours, 15:00)
it will only trigger from now until 15:00 today, or not at all ifnow
is already after 15:00. The change basically uses the explicit or implicit date from the first argument as the date for the third argument if its date is omitted. See 66e95d1.