| View previous topic :: View next topic |
| Author |
Message |
ldevries Voice
Joined: 23 Feb 2013 Posts: 12 Location: Great Falls
|
Posted: Sat Mar 16, 2013 11:31 am Post subject: bind cron |
|
|
I have a .tcl script that calls for a event on mar 19 @ 8:20am. I have the following entry:
| Code: |
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 |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Mar 16, 2013 2:23 pm Post subject: |
|
|
You could try bind time
bind time - "min hour day month year" procname _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Mar 16, 2013 3:52 pm Post subject: Re: bind cron |
|
|
| 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 |
|
| Back to top |
|
 |
ldevries Voice
Joined: 23 Feb 2013 Posts: 12 Location: Great Falls
|
Posted: Sat Mar 16, 2013 4:31 pm Post subject: |
|
|
thanks.. gave that a try and it did not post... I had
| Code: |
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 |
|
| Back to top |
|
 |
ldevries Voice
Joined: 23 Feb 2013 Posts: 12 Location: Great Falls
|
Posted: Sat Mar 16, 2013 4:41 pm Post subject: Re: bind cron |
|
|
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: |
proc removeallbinds {bindtype} {
foreach bind [binds $bindtype] {
unbind [lindex $bind 0] [lindex $bind 1] [lindex $bind 2] [lindex $bind 4]
}
}
removeallbinds cron
removeallbinds time
|
|
|
| Back to top |
|
 |
ldevries Voice
Joined: 23 Feb 2013 Posts: 12 Location: Great Falls
|
Posted: Sat Mar 16, 2013 5:34 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|