- Process.

- Process.

- Process.

- Process.

You can either just kill an instance of your program or somwhow tell it that it needs to shut down.
An easy approach would be using files. The instance of the program waits for the creation / a specific content /... of a file and exits.
Better (and more difficult) solutions are named

.