Gateway tag change script

i am stuck in a situation where i insert data into database along with the time stamp of insertion…i want to check the time stamp for next 90 min, after which i have to display to user that data is no longer valid.
i have one date tag defined which holds the “timeout time” of the data.

i want to write a gateway tag change script,where i compare the data from date tag with now() function.
and based on the comparison i want to change data in one of the database column.

whether is it possible to do in gateway tag change script?

Yes absolutely. You can define a tag change script under Project/Scripts/Gateway Event Scripts.
There is an option there for defining Tag Change Scripts.
You could also possibly define the script in the Gateway Timer scripts if that would be preferable to check a value every X minutes.

I’m not sure how you would achieve it with a tag change script. Because your “timeout time” tag is presumably only update at the time of insertion, and you want your script to execute 90 minutes AFTER insertion, not at the time of insertion correct?

How about, if you create a boolean expression tag that is now() > timeout or abs(now() - timeout) or some such.
You could have your tag change script execute when this boolean tag goes true.