Stop a shell (python) script once executed

I made a trigger that starts up a script that continuously runs, is there a way to stop the script from btt?