It apears that you are using the timer command incorrect.
Tcl has a special meaning for commands within [] brackets.
A lot of commands, return data, and as suhc, this data needs some method or another, of being stored, or used in another command. THe goal of the [] brackets, it to allow this data return to take place.
Anything between [ and ] is called as a command, and is then replaced with the return value, on the fly (meaning, if the return value is different each time, so will the value being replaced).
Thus, if using
Code: Select all
proc mycommand {} {
return this
}
timer 180 [mycommand]
This is saying, run the code between the [], and replace it with the returned value. Thus, the command becomes
Thus, the [mycommand] is replaced instantly, and the command "this" is executed after 180 mins.
In your case, this is obviously wrong.
You should infact be using a plain old
This would run the command "mycommand" after 180 mins.
Applying this to your script, in reality, you simply change the command so that the []'s are removed.
However, this does not solve your problems 100%.
You state that ".tcl timer 180 [blah]" didn't work. In that case, there is a problem witht he rest of your script anyway. Seeing as the []'s mean your script is run right away, it should have done a database update.
If it hasn't, then this neads looking intop itself.
Beyond that, once a timer has run it's course, it dies. IE, it's one off thing. And you will need to a create a newone, after it has completed it's cycle of 180 mins.