in reply to Abort if instance already running?
You're looking for Highlander: one instance at a time, resp. here on the site, Highlander - allow only one invocation at a time of an expensive CGI script.