| View previous topic :: View next topic |
| Author |
Message |
Zeta Voice
Joined: 04 Apr 2008 Posts: 16
|
Posted: Fri Sep 25, 2009 11:49 am Post subject: timer every 2 minutes |
|
|
how i can launch a "bind time" every 2 minutes?
bind time - * blabla:blabla ...? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Sep 25, 2009 3:25 pm Post subject: |
|
|
The following will trigger at minutes 00, 02, 04, 06....58 of every hour.
| Code: | bind time - * twomins
proc twomins {min args} {
if {[scan $min %d] % 2 == 0} {
# two minutes passed, do stuff
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Zeta Voice
Joined: 04 Apr 2008 Posts: 16
|
Posted: Fri Sep 25, 2009 5:15 pm Post subject: |
|
|
Thanks Sir_Fz
you are the best! |
|
| Back to top |
|
 |
|