I would like to be able to update a perl script statistics file that I have on my website automatically several times a day via windows task scheduler, this is the only way I can think to do it. I am using the awstats - http://awstats.sf.net - statisitics script and this is the only way I can see other than manually clicking on the update from the browser to update the statistics each day. Anyway I was thinking if I could write a batch file I could get it to run via the task scheduler. I'm no expert at batch files though, let me outline what I want to do and maybe you can help
1. connect to ftp via telnet, I can do this now with the command:
2. Now I want it to pause for a couple seconds until the telnet asks for my password. Then when it asks for my password I want it to enter it and log in, how can I do this?Code:telnet o website.com -l username
3.4.Code:cd website.com/somefolderwithstatistics/5. exit for telnet and close the cmd windowCode:perl awstats.pl -config=mysite -update
Any ideas on how to do this (or maybe there is some freeware that will make it easier than a batch file)? Thanks
+ Reply to Thread
Results 1 to 8 of 8
-
-
Here's a VB script which you could modify to send the correct commands
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=9105&lngWid=4
Note - Just tried it out and it works well. You'll have to modify it and replace the USERNAME and PASSWORD entries with your specific info, plus the ip address and port number (you don't need to specify the port number if your server uses port 23 by default). Also, you'll need to add the commands you wish to run, but the script syntax is very easy.
To invoke it from Task Scheduler, the command would be -
cscript //nologo c:\windows\nameofyourscript.vbs
Another app which should be able to script regular command line telnet is
http://www.bsoutham.org/AutoApp/index.html -
Task manager refuses to run this for me, it keeps citing errors about my username and password, although they are both correct!! Is there a different freeware app out there that could do this auto scheduling for me?
-
Thanks,
I believe I have it configured correctly, will it start automatically each time with windows? -
Supposed to...
I believe it loads as a service. Go into service manager and make sure it is set to "Automatic". -
Yep it is, and it works well. I think at first it was misreading the delays because it was a .vbs instead of .cmd or .bat, but now it seems to be working fine
Similar Threads
-
Link to stats
By stiltman in forum FeedbackReplies: 5Last Post: 19th Feb 2010, 17:12 -
Stats - Movies - Blu-ray- HD DVD
By joepic in forum Latest Video NewsReplies: 0Last Post: 11th Aug 2008, 15:09 -
Former Gordian Knot user- What is this Stats File?
By samhain86 in forum DVD RippingReplies: 6Last Post: 19th May 2008, 03:43 -
Forum Stats ????
By jimmalenko in forum FeedbackReplies: 2Last Post: 1st Sep 2007, 17:43 -
my PC stats plz help can i edit on this
By Kigi in forum ComputerReplies: 8Last Post: 30th May 2007, 02:30