File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,14 @@ proc ::task args {
43
43
id { lappend task_id $arg }
44
44
ids { lappend task_id {*}$arg }
45
45
in { set execution_time [expr { $now + [::task::time $arg ] }] }
46
- at { set execution_time $arg }
46
+ at {
47
+ if { [string length $arg ] < [string length $now ] } {
48
+ # We assume this is seconds since it couldnt be milliseconds :-P
49
+ set execution_time [expr { $arg * 1000 }]
50
+ } else {
51
+ set execution_time $arg
52
+ }
53
+ }
47
54
regex* - glob {
48
55
if { [string is false $arg ] } {
49
56
set flags [lsearch -all -inline -not -exact $flags -all]
@@ -181,7 +188,9 @@ proc ::task::taskman args {
181
188
if { $should_execute } {
182
189
if { [dict exists $task subst] } {
183
190
catch { after 0 [subst -nocommands [dict get $task cmd]] }
184
- } else { after 0 [list try [dict get $task cmd]] }
191
+ } else {
192
+ after 0 [list try [dict get $task cmd]]
193
+ }
185
194
}
186
195
187
196
if { [dict exists $task every] && ! $cancel_every } {
@@ -213,6 +222,10 @@ proc ::task::taskman args {
213
222
}
214
223
}
215
224
225
+ proc ::task::execute { cmd } {
226
+
227
+ }
228
+
216
229
# removes a task from the scheduled execution context, responds with the
217
230
# value requested.
218
231
# respond_with can be: total (total tasks removed) | ids (ids of removed tasks)
You can’t perform that action at this time.
0 commit comments