added kill process

Sure, but then your script should also sleep for a while, test if it was able to kill successfully and call kill -9 after N seconds, otherwise you'd be left with hanging processes and the next run would be messed up.