title: How to kill the old process of crontab script in linux
body: <p>I have a Korn shell script which runs in cronjob. This Korn shell script has to kill a process which is running and start the new process again.</p>
  
  <pre><code>#!/bin/ksh
  #
   # Startup script 
  
  case "$1" in
  start)
  echo -n "Starting interpreward services: "
  cd /home/to/folder
  /home/user/folder/jdk1.8.0_121/bin/java -Xmx512m -Xms256m -jar file.jar file=file.properties
  
  ;;
  stop)
  echo -n "Stopping interpTestreward services: "
  pkill subTest
   ;;
  status)
  status interpTest
  ;;
  restart|reload)
  $0 stop
  $0 start
  ;;
  condrestart)
  $0 status
  if [ $? -eq 0 ]; then
  $0 stop
  $0 start
  fi
  ;;
  *)
   echo "Usage: interpreward {start|stop|status|restart}"
  exit 1
  esac
  exit 0
  </code></pre>
  
  <p>is there something to mention in the code of the script to kill the old process ?</p>