VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. 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:
    Code:
    telnet o website.com -l username
    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?

    3.
    Code:
    cd website.com/somefolderwithstatistics/
    4.
    Code:
    perl awstats.pl -config=mysite -update
    5. exit for telnet and close the cmd window

    Any ideas on how to do this (or maybe there is some freeware that will make it easier than a batch file)? Thanks
    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  3. Thanks a lot, it works perfectly!!!!
    Quote Quote  
  4. 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?
    Quote Quote  
  5. Thanks,

    I believe I have it configured correctly, will it start automatically each time with windows?
    Quote Quote  
  6. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Supposed to...

    I believe it loads as a service. Go into service manager and make sure it is set to "Automatic".
    Quote Quote  
  7. 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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!