You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chuck <to...@echeeba.com> on 2003/08/22 16:29:13 UTC

Polling/Timing Help: Kinda Offtopic

Our project is based on Tomcat but we have a standalone server component 
that I need some help with. Sorry if off-topic, have not had much luck 
elsewhere.

Anyway, I will have a standalone java server (which some tomcat webapps 
will be talking to). What I need to do is some advanced scheduling based 
on time. I basically need some mechanism based on time where I can run 
tasks on a schedules basis. UNIX cron is a vague example, but what I 
need must be more accurate and reliable. (ie, UNIX cron, if you have 10 
jobs schedules to start at 12:01pm, there is no gurantee as to what 
second they will actually spawn)

For example, I have an SNMP agent that will wake up every 15 seconds, do 
it's thing, and then sleep for another 15 seconds. There will also be 
many other agents all will different polling periods that are user 
customizable.

I would like to work in units of milliseconds. Can anyone point me to 
some resources/websites/example code that can assist me in this 
endeavor? I am relateively new to Java but have a lot of C/C++ in my 
background. I am now a Systems Engineer and am designing a network 
monitoring package. (if you are familiar with opennms, www.opennms.org, 
then you will know what I mean)

Thanks for any help,
CC