Daemon 101

I think I have an issue almost like Sammy_T's. I want to make a piece of code run as a daemon. I have some java, along with it 15 classpath's converted to a shell script that I can "runmyjavap". The script is just what I need to run after compiling it:

#!/bin/sh
java -classpath : ...(from here all my classes and ends with my java file name)

I can cron this thing and run it as a cronjob every half hour, because it's just renaming files based on requests. But I found out earlier that the request might be coming in very frequently like every minute. From what I read on a daemon I think it could solve my problem, if I could have one that sleeps every other minute and handles this. But I am clueless as how to and where in my shell script to add this implementation. Please help me understand if you can.

Miller,
Try this:

while true
do
  java -classpath..............
  sleep 60          ### This is the number of seconds.
done

I will give this a shot...thanks!!!

How do the requests arrive? Can you not wake up your application based on an IPC event?