Interrupt running scripts

Is there a way to interrupt a running script? There are two possibilities which I’d like to be able to do:

  1. to stop the script midway and run it afresh
  2. to stop it midway and then continue the run

Many thanks, boonlay.