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.
Old posts that have not been replied to for several years.
makam
Voice
Posts: 15 Joined: Thu Jul 08, 2004 1:16 am
Location: Montevideo, Uruguay
Contact:
Post
by makam » Mon Aug 23, 2004 3:19 am
Why this code dont ejecute?
bind time - "10 * * * *" mi_proc
proc mi_proc {min hour d month year} {
putlog "This is an example..."
}
...ugh?
makam
Voice
Posts: 15 Joined: Thu Jul 08, 2004 1:16 am
Location: Montevideo, Uruguay
Contact:
Post
by makam » Mon Aug 23, 2004 3:25 am
well, this code may be ejecute each 10 minutes, right?
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Mon Aug 23, 2004 6:08 am
makam wrote: well, this code may be ejecute each 10 minutes, right?
"10 *" means ten minutes past every hour, try "?0 *" instead
Have you ever read "The Manual"?
makam
Voice
Posts: 15 Joined: Thu Jul 08, 2004 1:16 am
Location: Montevideo, Uruguay
Contact:
Post
by makam » Mon Aug 23, 2004 10:24 am
if i want each 2 minutes?
"?2 * * * *"
is it ok?
Thx...
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Mon Aug 23, 2004 10:53 am
Nope..that's 2 minutes past every ten minutes. How about reading tcl-commands.doc? The mask is matched against the current time each minute.
There's no way to match every 2 minutes with a single mask. (you need five: "?0 *", "?2 *", "?4 *", "?6 *" and "?8 *")
It would probably be better to do the interval check from inside the proc and just bind to "*" (every minute)
Code: Select all
bind time - * mi_proc
proc mi_proc args {
set interval 2;# minutes
if {(([clock sec]/60)%$interval)==0} {
putlog "This is an example..."
}
}
Have you ever read "The Manual"?
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Wed Aug 25, 2004 7:50 pm
hmm how come this works clock sec ?? from what i recall its only "scan seconds format clicks" just wondering not trying to correct u
XplaiN but think of me as stupid
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Thu Aug 26, 2004 8:31 am
Ofloo wrote: hmm how come this works clock sec ?? from what i recall its only "scan seconds format clicks" just wondering not trying to correct u
From the 'clock' manual page:
... The legal options (which may be abbreviated ) are: ...
http://forum.egghelp.org/viewtopic.php?t=4444#20546
Have you ever read "The Manual"?
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Thu Aug 26, 2004 4:45 pm
hmm i think i understand now .. tnx
XplaiN but think of me as stupid