in reply to Re: Running subroutines at specific times
in thread Running subroutines at specific times

Thanks, let me add a little more detail.

I currently have a script which fires of a load of threads, to do SNMP polls on particular devices, each poll getting its own thread. I dont want to have a thread per device constantly running, especially if all its doing is sleeping.

So I suppose what I'm after is the ability to fire the same routine of (as a thread) every 20 seconds for device A, every 30 seconds for device B etc.

I was planning on reading in the device -> polling rate realtionship from a file. So it has to be a little dynamic.

  • Comment on Re^2: Running subroutines at specific times

Replies are listed 'Best First'.
Re^3: Running subroutines at specific times
by blazar (Canon) on Apr 21, 2006 at 09:03 UTC
    Thanks, let me add a little more detail.

    Whatever the details may be, you already explained them in this post of which this one is a dupe, which is the reason why I and apparently others downvoted it. Regardless of the details, it seems to me that people supplied enough input already, are you having problems with any of these suggestions? I see that saintmike supplied a complete example, and BrowserUk suggested another approach, which should be more near to your original attempts. If you're having any specific problem with those suggestions, feel free to ask for further clarification...