View previous topic :: View next topic |
Author |
Message |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Thu Oct 13, 2005 1:57 pm Post subject: Action script |
|
|
Hi, does anyone know of a script that will run another script at certains times of the day.
You see i have a script that can kick the source on a shoutcast server when i use a command, is there a script that can perform this command every few hours at pre set times that are easy 2 change ?
HELP PLZZZ
   
Nick. _________________ www.NT-Hosts.Net - More than just a host |
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Oct 13, 2005 5:01 pm Post subject: |
|
|
Use [bind time], this is an example:
Code: | bind time - "00 00 *" perform:command
proc perform:command {min hour day mon year} {
# do whatever
} |
"00 00 *" means perform the command at time 00:00 any day, month and year. Read about it in Tcl-commands.doc. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
Back to top |
|
 |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Thu Oct 13, 2005 8:52 pm Post subject: |
|
|
How would i make that do a command at serveral different times a day and on different days of the week ? sorry im a n00b 2 this  _________________ www.NT-Hosts.Net - More than just a host |
|
Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Oct 14, 2005 4:09 am Post subject: |
|
|
Lynxfm wrote: | How would i make that do a command at serveral different times a day and on different days of the week ? sorry im a n00b 2 this  |
bind to "00 *" and check for hour and weekday (refer 'clock format' and 'unixtime' in TCLCommands). Oh yes, the most important thing is using a boolan expression in an if construction. You dont have to know about TCL to create this, because this is the same since Basic (at least on C64). _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Oct 14, 2005 5:10 am Post subject: |
|
|
You can also add several time binds calling the same proc. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Oct 14, 2005 5:51 am Post subject: |
|
|
but you cant bind to week days _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
Back to top |
|
 |
|