This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
-
ppslim
- Revered One
- Posts: 3914
- Joined: Sun Sep 23, 2001 8:00 pm
- Location: Liverpool, England
Post
by ppslim »
I think you would be better off using the time bind.
This will prvent the duplication fo timers.
-
Zsac
- Voice
- Posts: 15
- Joined: Sun Nov 17, 2002 10:12 pm
Post
by Zsac »
don't you guys want to watch for spawning extra timers on a rehash? the script bits i'm seeing would all spawn extra timers. :^/
-
stdragon
- Owner
- Posts: 959
- Joined: Sun Sep 23, 2001 8:00 pm
-
Contact:
Post
by stdragon »
If you make timers or stacking binds in your script, you should do something like this:
Code: Select all
if {![info exists yourscript_loaded]} {
set yourscript_loaded 1
utimer 5 someproc
bind pubm - * blah
}
-
simonbell
- Halfop
- Posts: 68
- Joined: Mon Aug 05, 2002 8:07 pm
- Location: Washington, England
-
Contact:
Post
by simonbell »
Ok, how would i use the time bind to make it execute the script every minute, or 2 minutes?
using proc-name min hour day month year,
would 2 0 0 0 0 make it execute every 2 minutes, or everytime the clock hit 2 minutes past whatever?
Simon
-
ppslim
- Revered One
- Posts: 3914
- Joined: Sun Sep 23, 2001 8:00 pm
- Location: Liverpool, England
Post
by ppslim »
Tcl-commands.doc states quite clearly how this bind works.
You state the exact time fo day, or a mask of when it should be called.
However, using basic math, and a if-elseif-else statement, you can control more precily what time it is triggered.