Cron question with CentOS...
Hello!
I've been setting up a server for my website, that uses a server version of CentOS. In case you don't know, CentOS is a community-supported free version of Red Hat Enterprise Linux.
I'm wondering if the following is possible. You see, my server runs a IRC bot (which is a java logbot available at jibble.org) to log all the things said in a channel on a IRC network. I boot it up currently via SSH, using PuTTY on my windows PC. Only thing is, when I close down PuTTY, it closes the bot too.
I'm wondering if it's possible to make a cron job that runs every 2 hours or so, that looks for the java process (as the bot is invoked by java -classpath....) and if it's running, exits, but if it's not running, it starts the java process with the needed parameters.
Is this possible? I don't want to have clones of my IRC bot starting up every 2 hours. (If so, what would the script be?)
Thanks in advance.