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.
d
daplaya
Post
by daplaya » Mon Feb 04, 2002 7:21 pm
Here's what I want to do.
I want to upload a *.html file with sendftp.tcl once/hr
But I'm having with problems with the timer script, I want it to call this 1/h
sendftp <localfile> <server> <user> <password> <remotefile>
Can u help?
Wcc
Master
Posts: 278 Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:
Post
by Wcc » Mon Feb 04, 2002 11:49 pm
Code: Select all
if {[lsearch -glob [timers] "* timer:sendftp *"] == -1]} { timer 60 timer:sendftp }
proc timer:sendftp {} {
sendftp <localfile> <server> <user> <password> <remotefile>
if {[lsearch -glob [timers] "* timer:sendftp *"] == -1]} { timer 60 timer:sendftp }
}
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Tue Feb 05, 2002 12:44 am
thats the old fasioned way of doing it. using 'bind time' is more efficient
d
daplaya
Post
by daplaya » Tue Feb 05, 2002 12:19 pm
Thanks wcc, I haven't had the chance to try it yet cause my shell provider seems to be down atm
About "the new way", I read some about bind time and I want to know if this looks ok:
Code: Select all
bind time - "56 * * * *" time:sendftp
proc time:sendftp {} {
sendftp etc.
}
Wcc
Master
Posts: 278 Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:
Post
by Wcc » Tue Feb 05, 2002 7:12 pm
No, you need to specify arg's for the proc (or just use 'args').
Code: Select all
bind time - "56 * * * *" time:sendftp
proc time:sendftp {args} {
sendftp etc.
}
d
daplaya
Post
by daplaya » Wed Feb 06, 2002 5:20 pm
Yeah, I discovered that when I tried to run it, thanks anyway