Top of the hour transaction group trigger

What be the best way to have a transaction group trigger at the top of every hour, ie 12:00 13:00. …etc 24 hours a day 7 days a week?

Currently I am using an expression that is looking at the system clock and using a a limit test for time between XX:XX:XX - (XX:XX:XX + 10 seconds) and set the trigger to a non-zero value. Oustide the limit the trigger is set back to 0. For 24 hours , i have 24 limit tests, there has to be a better way.

A one second timer that checks the current time to see if the hour has change from the last time it checked?

Ideally we should be able to say “run this script at this time”. If we can’t, we should be adding a feature request.

[quote=“Robert”]A one second timer that checks the current time to see if the hour has change from the last time it checked?

Ideally we should be able to say “run this script at this time”. If we can’t, we should be adding a feature request.[/quote]

Robert,
thanks for that, but if the system clock is changed +/- 1 hour, a trigger will happen. So far this is the only way I could figure out how to do it:


Why not use a schedule (instead of a timer) with times:“0-24” and a 1 hour rate?

Hi Curly,

How does your method prevent a missing/extra run when the clock changes?

solution: use GMT to trigger. (just thought of this :slight_smile: )

Ivan’s suggestion is what I was going to say, use the schedule mode. One interesting small nuance of that mode is that it aligns the execution to a rate multiple of the starting time. In other words, if you do it as he suggested, it will be top of the hour.

If you’re using an older version that doesn’t have that mode, I’d just create a run always expression item, set the expression to “dateExtract(now(), “hour”)”, and set up an “on change” trigger on that item.

Regards,

[quote=“Colby.Clegg”]Ivan’s suggestion is what I was going to say, use the schedule mode. One interesting small nuance of that mode is that it aligns the execution to a rate multiple of the starting time. In other words, if you do it as he suggested, it will be top of the hour.

If you’re using an older version that doesn’t have that mode, I’d just create a run always expression item, set the expression to “dateExtract(now(), “hour”)”, and set up an “on change” trigger on that item.

Regards,[/quote]

Colby,
excuse me for being a dummy, but can you post how I should alter my transaction group trigger to the method suggested?

Thanks

Hi,

Here’s the schedule settings I was suggesting:

However, if your version of the sqlbridge doesn’t have the schedule option (I forget exactly when it was added, 7.4?), this could work too:



In that case, you would just need your group to run at a 1 second rate or so.

Regards,

Excellent!

Thanks for this. This customer’s app is V7.2.11 so it does not have that feature you mentioned. I will implement and test tomorrow.

Mine is similar to Colby’s, but looking at the minutes. It’s not susceptible to DST changes.

This will return a 1 when the minute is at 0

!toBoolean(dateextract(now(),"minute"))