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.

Action script

Old posts that have not been replied to for several years.
Locked
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

Action script

Post by NTHosts »

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

:D:D:D:D:D

Nick.
www.NT-Hosts.Net - More than just a host
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Use [bind time], this is an example:

Code: Select all

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.
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

Post by NTHosts »

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
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You can also add several time binds calling the same proc.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
Locked