I've a small trouble using the cron package.
My try:
Code: Select all
.tcl ::cron::task exists test
Tcl: 0
.tcl proc mycron {} { putlog "done : [::cron::task info test]"; ::cron::in test 10 mycron}
Tcl:
.tcl ::cron::in test 10 mycron
Tcl: test
[17:18:44] done : object {} lastevent 1623251925001 lastrun 1623251925001 err 0 result {} running 1 coroutine {} scheduled 1623251925000 frequency -1 command mycron
.tcl ::cron::task exists test
Tcl: 0
If I launch it with ::cron::every, the result is:
Code: Select all
.tcl ::cron::every test 5 mycron
Tcl: after#93
[17:24:30] done : object {} lastevent 1623252271001 lastrun 1623252271001 err 0 result {} running 1 coroutine {} scheduled 1623252276000 frequency 5000 command mycron
[17:24:36] done : object {} lastevent 1623252276003 lastrun 1623252276003 err 0 result test running 1 coroutine {} scheduled 1623252281000 frequency 5000 command mycron
[17:24:41] done : object {} lastevent 1623252281002 lastrun 1623252281002 err 0 result test running 1 coroutine {} scheduled 1623252286000 frequency 5000 command mycron
[17:24:46] done : object {} lastevent 1623252286003 lastrun 1623252286003 err 0 result test running 1 coroutine {} scheduled 1623252291000 frequency 5000 command mycron
[17:24:51] done : object {} lastevent 1623252291003 lastrun 1623252291003 err 0 result test running 1 coroutine {} scheduled 1623252296000 frequency 5000 command mycron
[17:24:55] done : object {} lastevent 1623252296003 lastrun 1623252296003 err 0 result test running 1 coroutine {} scheduled 1623252301000 frequency 5000 command mycron
Any idea about what I do wrong or misunderstand ?