This looks like it would work, and if you implemented my solution it should only run once.
Another trick you could use is to store a global variable with the last license number checked and only check it if the license number has changed, that way it would never fire twice for the same entry.