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.

timer every 2 minutes

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
Z
Zeta
Voice
Posts: 16
Joined: Fri Apr 04, 2008 8:52 pm

timer every 2 minutes

Post by Zeta »

how i can launch a "bind time" every 2 minutes?

bind time - * blabla:blabla ...?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

The following will trigger at minutes 00, 02, 04, 06....58 of every hour.

Code: Select all

bind time - * twomins

proc twomins {min args} {
 if {[scan $min %d] % 2 == 0} {
  # two minutes passed, do stuff
 }
}
Z
Zeta
Voice
Posts: 16
Joined: Fri Apr 04, 2008 8:52 pm

Post by Zeta »

Thanks Sir_Fz
you are the best!
Post Reply