Tag Event Change

I have been trying to write to a tag, which is acting as a flag, when the previousValue.value == currentValue.value in a tag value changed script. However, it doesn’t work.

Anyone knows why ?

And how could i trigger the flag if the value of a tag doesn’t change ?

Sounds like a job for a timer script that runs unconditionally.