Hey all
I have a php script that I need to be running 24/7 on a linux platform. I have a dedicated server with centos 5 that I have access via ssh.
The php script is written so that it loops indefinitely. However, it inexplicably hangs after 30 - 60 minutes of runtime and I have had to restart it manually everytime this happens.
However, as a workaround, I'm looking for some type of a cronjob that can just kill the script after every 30 minutes and then restart it automatically.
Being the absolute noob that I am when it comes to linux, I have not been able to make much headway at all into getting this to happen.
Anyone help with what i should do now and what to put into the crontab would be greatly appreciated. Thanks!
Basically this is what I need the cronjob to accomplish
1) start running the script
2) kill the script after 30 minutes of runtime.
3) immediately restart running the script again.
4) kill the script after 30 mins and restart it again ... and so on ...