| View previous topic :: View next topic |
| Author |
Message |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Tue Dec 16, 2008 3:16 am Post subject: proc run schedule |
|
|
bind time {40 * * * *} myproc
is that correct?
i think no
how i can do that to run my command every 40 minites? |
|
| Back to top |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Tue Dec 16, 2008 8:07 am Post subject: |
|
|
try:
| Code: | | bind time - "40 * * * *" my_proc |
for test change 40 to 2 or smth ;p |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Dec 16, 2008 3:20 pm Post subject: |
|
|
Actually, the use of "" or {} does not matter in this case, as there is nothing to be substituted in the preprocessing phase.
What is to be kept in mind, however, is that the mask is matched against "minute hour day month year" every minute. If the mask matches, the associated command is evaluated. In your case, it means the command will be triggered once every hour, twenty minutes to the hour (01:40, 02:40, 03:40 ... 23:40).
To trigger something every 40 minutes, your best option is most likely to use a recursive 40min timer.. Most basic version is shown below:
| Code: | proc someproc {} {
...
#Now a recursive call
timer 40 [list someproc]
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Tue Dec 16, 2008 5:42 pm Post subject: |
|
|
eh.. :s easy answer thnx stupid question :S run one timer 40 and inside again timer.. ix.
thanx  |
|
| Back to top |
|
 |
|