it comes down who own the lock and when it should be released.  the fact that you move TryGetLock in the same while loop as RunJobInstance(), don't you need to dispose the lock before acquiring it again.   for instance, will TryGetLock fail on the second iteration of while loop?