How to change gateway script timer timeout

I need some syntax help here.

I have created a gateway timer script that toggles a control if there are unacked alarms.
The customer wants a one hour timeout to allow someone time to ack the alarm before I toggle the control again.

What I came up with was:

if (any_alarms) : toggle_control event.source.delay = 60 * 60 * 1000 else : event.source.delay = 5000

The problem is the [tt]event.source.delay = x[/tt] doesn’t seem to work. What should it be?

You could also use the database to store the date/time or time elapsed. I would use the alarm table to get this info, adding a column if necessary. The gateway script would periodically check and perform said action after the hour has elapsed for a given alarm.

True, but that adds more logic to the script and adds dependencies. I was able to do this to a client timer. Is there some reason I can’t do the same thing with a gateway timer?

No, you can’t do that. Client timer components aren’t anything like the gateway/client timer scripts. Their delay isn’t adjustable, sorry.

I guess I’ll implement Nathan’s suggestion then.