Take your current command in question and rename it as a subroutine. Then use the command name that starts the operation first kill any of the subroutine name running, then call it.
As an example, here's a part of my routine for engaging warp. I only wanted one instance of a scanner reset run at a time.
Kill command, 'reset scanner'
Execute command, 'reset scanner'
This way the kill doesn't kill itself, like you mention, just that part that you want.