How to stop a ping in the running script?

Gennrally,I start ping at new termital windows.
If I apply a script with “ping x.x.x.x” content,and run this script.It does work.
I wonder how to stop this ping command?

I find it : system script job pri

Ctrl-C interactively, but if it’s a script you don’t have that: then kill the script as you just discovered.