[SS] 16Dec2004: A Tcl user had a problem in the Tclers chat with timers and syncronization. The problem is to execute some code every 30 minutes, but syncronized with the real clock of the comuter. So at 01:00, 01:30, 02:00, and so on. The following procedure should do just it, but it's possible to change the timer period modifing the 'every' variable that's hardcoded to 1800 in this example. I didn't tested the code a lot... so if you need to use it in a critical application please do some test. proc cron {{opt {}}} { set every 1800 if {$opt eq {}} { # Do the work you need every $every seconds puts [clock format [clock seconds]] } after [expr {($every-([clock seconds] % $every))*1000}] cron } cron -init vwait forever