How to force quit and restart a service every hour?
In Terminal, ps -ef to identify a search string for the process you want to kill.
Then the script can find it by
ICPID=$(ps -ef | grep &quot;searchstring&quot; | awk '{print $2}') # find the PID

kill -9 $ICPID                                           # kill it

&lt;full path to executable&gt;                                # restart it

The 9 is the signal to send to the process.  From the man page:
Some of the more commonly used signals:
 1       HUP (hang up)
 2       INT (interrupt)
 3       QUIT (quit)
 6       ABRT (abort)
 9       KILL (non-catchable, non-ignorable kill)
 14      ALRM (alarm clock)
 15      TERM (software termination signal)