Take the tour ×  I have been assigned on designing a java
program on a linux machine that:    1. Connects to a database
2. reads a record   3. retrieve certain information and send to
Nagios according to a field known as 'threat_level'   4. read
next record and repeat step number 3 until all records have been
read  Now, I needed to get this to run every few minutes; so
what my partner did was create a script that uses a loop to run
the program, sleeps a few minutes, and repeat.  Recently, my
boss told us that its good but would like the whole procedure to
be completely self contained in java; meaning that it loops and
sleeps within java. On top of that, he would like to have the
sleep duration be determined by command line each time that the
program is run.  I did some research and it seems that using
Thread.sleep() is inefficient in certain circumstances and I
cannot tell if this is one of them or not. Also, I am still
unclear on how to have the sleep time be determined via command
line upon running the pr