I'm trying to create a script that will do particular sub routines at specific intervals. i.e. Every 10 seconds run sub1() , 25 seconds run sub2() and every 60 seconds run sub3().
I've done some searches for code or modules but can't seem to find anything that can get me started, any pointers?
Upadte **********************
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.
Thanks
The True StellaGod
2006-04-20 Retitled by GrandFather, as per Monastery guidelines
Original title: 'Timed Subroutines'
In reply to Running subroutines at specific times by stellagoddc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |