This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

bind cron

Help for those learning Tcl or writing their own scripts.
Post Reply
l
ldevries
Voice
Posts: 12
Joined: Sat Feb 23, 2013 7:01 pm
Location: Great Falls

bind cron

Post by ldevries »

I have a .tcl script that calls for a event on mar 19 @ 8:20am. I have the following entry:

Code: Select all

bind cron - "20 08 19 03 *" do_hs_post 

proc do_hs_post {min hour day month weekday} { 
global stockchan 
putserv "privmsg $stockchan :\0034Economic Event In 10 Minutes\017 - \00312Housing Market Index\017" 
} 
however, for some strange reason it is executing everyday. What am I doing wrong.
Last edited by ldevries on Sat Mar 16, 2013 3:44 pm, edited 1 time in total.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

You could try bind time

bind time - "min hour day month year" procname
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: bind cron

Post by willyw »

dutch1918 wrote: ...
however, for some strange reason it is executing everyday. What am I doing wrong.
...
In the partyline, do:
.binds *cron*
and see what you have listed.

Perhaps you have edited that bind, (and you used .rehash) and an old bind is still there?
If so, the solution is to do: .restart
l
ldevries
Voice
Posts: 12
Joined: Sat Feb 23, 2013 7:01 pm
Location: Great Falls

Post by ldevries »

thanks.. gave that a try and it did not post... I had

Code: Select all

bind time - "55 16 16 03 *" do_test_post

proc do_test_post {min hour day month year} {
	global stockchan
	putserv "privmsg $stockchan :\0034Economic Event In 10 Minutes\017 - \00312test\017"
}
I confirmed witn .bind *time*

<STBot> TYPE FLAGS COMMAND HITS BINDING (TCL)
<STBot> time -|- 55 16 16 03 * 0 do_test_post
Last edited by ldevries on Sat Mar 16, 2013 4:57 pm, edited 1 time in total.
l
ldevries
Voice
Posts: 12
Joined: Sat Feb 23, 2013 7:01 pm
Location: Great Falls

Re: bind cron

Post by ldevries »

In the partyline, do:
.binds *cron*
and see what you have listed.

Perhaps you have edited that bind, (and you used .rehash) and an old bind is still there?
If so, the solution is to do: .restart[/quote]

I have the following to clear bind crons & time on .rehash which works

Code: Select all

proc removeallbinds {bindtype} {
 foreach bind [binds $bindtype] {
 unbind [lindex $bind 0] [lindex $bind 1] [lindex $bind 2] [lindex $bind 4]
 }
}

removeallbinds cron
removeallbinds time
l
ldevries
Voice
Posts: 12
Joined: Sat Feb 23, 2013 7:01 pm
Location: Great Falls

Post by ldevries »

After doing some more research I found that march month is 02 not 03. Thus it works and the problem is now solved. Thanks for your help
Post Reply