it's easy:
if &FLAG = 1
variable clear %FLAG
...
stop
end if
if &FLAG != 1
variable set %FLAG = 1
...
end if
Because there is no 'else' command, you need to 'stop' the task inside
the first 'if', or else the second 'if' would be executed also.
An 'else' command would be a good feature to add to Tasker...