After writing a server socket in ruby, I had to find out a solution to monitor its process in any way. I knew that there is a gem for that called God. I also new that scheduling jobs in NIX systems are quit easy using the crontab tool. The problem was though how I would handle the process monitoring part. I had heard of Bash scripting but never buried myself in it.

After a day or so, I ended up with the script below. It is well documented and in case of learning, this is a nice tutorial. The use case of this script would be to schedule it using the crontab tool.