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.

[SOLVED] A little question

Help for those learning Tcl or writing their own scripts.
Post Reply
R
Riddler
Halfop
Posts: 60
Joined: Sun May 20, 2007 10:20 pm
Location: Brasov, Romania
Contact:

[SOLVED] A little question

Post by Riddler »

Hello guys, I have a little question about "bind time" module:

the type for this command is:
bind time - "minutes hour days months" ( they are exactly two characters)
So this is my question:

How can I use this setting to do every 20 minutes a proc ?

This way ?

Code: Select all

bind time - "20 * * *" 

Regards,
Riddler
Last edited by Riddler on Sat Nov 28, 2009 8:09 pm, edited 2 times in total.
I am a man of few words, but many riddles
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Not quite, once every minute, a string is generated such as "minute hour day month year" of the current timestamp. This is then matched against any and all time-bindings.

"*0 * * * *" would match whenever the minutes are 00, 10, 20, 30, 40, or 50.
"*0 *" would match whenever the last digit of any of the "fields" except year is zero.

Best option to trigger every 20 minutes, I suppose, would be something like this:

Code: Select all

bind time - "00 *" yourproc
bind time - "20 *" yourproc
bind time - "40 *" yourproc
NML_375
R
Riddler
Halfop
Posts: 60
Joined: Sun May 20, 2007 10:20 pm
Location: Brasov, Romania
Contact:

Post by Riddler »

Ok, so if this is the code, I`ll try it out and post a reply with the results. :D 8)

Works Great, thanks nml :D
I am a man of few words, but many riddles
Post Reply