| View previous topic :: View next topic |
| Author |
Message |
DarkDeviL Voice

Joined: 03 Jul 2005 Posts: 10 Location: Denmark
|
Posted: Mon Dec 19, 2005 11:34 am Post subject: bind time, each quarter, (but hourly an extra command) |
|
|
Hey!
As I said in the topic, I have it like:
| Code: | bind time - "0 * * * *" ac_quarter
bind time - "15 * * * *" ac_quarter
bind time - "30 * * * *" ac_quarter
bind time - "45* * * *" ac_quarter
proc ac_quarter {min hour day month year} {
if {$min=="0"} {
ac_check
timer 1 ac_check2
} else {
ac_check
}
} |
Hourly, I want to do the same as each quarter, but additional an extra command should be used too, is this impossible?
I tried with if {$min=="0"}, and if {!$min} {, no one of them works hourly.
But if I do '.tcl ac_quarter 0 <some more bullshit here>', it works fine..
Simply, it ignore the hourly change when doing it automatically..
It should use ac_check hourly, and one minute after ac_check2.
If I remove ALL of the if-then-else stuff, it works fine each quarter.
Someone who know what the problem is? _________________ DarkDeviL.
E-mail: append '@staynet.org' to 'darkdevil'.
WWW: www.DarkDeviL.dk
IRC: #DarkDeviL, at irc.staynet.org |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
DarkDeviL Voice

Joined: 03 Jul 2005 Posts: 10 Location: Denmark
|
Posted: Mon Dec 19, 2005 2:08 pm Post subject: |
|
|
| Sir_Fz wrote: | Try
| Code: | | if {[string equal 00 $min]} { |
|
00 ?
Is it "00 * * * *" (zero twice) when the hour changes?
if, then it's the bind there's wrong?  _________________ DarkDeviL.
E-mail: append '@staynet.org' to 'darkdevil'.
WWW: www.DarkDeviL.dk
IRC: #DarkDeviL, at irc.staynet.org |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Dec 19, 2005 2:17 pm Post subject: |
|
|
True! good eye there DarkDevil, it should be 00 in the bind and it will work perfectly as it is (without using the line I gave you). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
DarkDeviL Voice

Joined: 03 Jul 2005 Posts: 10 Location: Denmark
|
Posted: Mon Dec 19, 2005 2:33 pm Post subject: |
|
|
Isn't that a bug in the eggdrop then?
I just checked my crontab, in there the '0 * * * * <command>' works fine.  _________________ DarkDeviL.
E-mail: append '@staynet.org' to 'darkdevil'.
WWW: www.DarkDeviL.dk
IRC: #DarkDeviL, at irc.staynet.org |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Dec 19, 2005 4:55 pm Post subject: |
|
|
| DarkDeviL wrote: | Isn't that a bug in the eggdrop then?
I just checked my crontab, in there the '0 * * * * <command>' works fine.  |
Not necessary a bug, it maybe takes it as a string 00 rather than a number. btw
| Code: | | bind time - "00 * * * *" ac_quarter |
can be reduced to
| Code: | | bind time - "00 *" ac_quarter |
since '*' matches everything (including spaces). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Tue Dec 20, 2005 12:08 am Post subject: |
|
|
| DarkDeviL wrote: | Isn't that a bug in the eggdrop then?
I just checked my crontab, in there the '0 * * * * <command>' works fine.  |
eggdrop has nothing to do with crontab, so requiring 00 is not a bug _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|