egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Trouble with cron package

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 848
Location: France

PostPosted: Wed Jun 09, 2021 11:29 am    Post subject: Trouble with cron package Reply with quote

Hi there,

I've a small trouble using the cron package.
My try:

Code:
.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

In my mind, the cron must be re-launch as I redo a ::cron::in in the procedure, but it doesn't.

If I launch it with ::cron::every, the result is:
Code:
.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

As you see, the process "test" is not modified with ::cron::in.

Any idea about what I do wrong or misunderstand ?
_________________
https://www.eggdrop.fr
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber