swm Posted October 15, 2010 Share Posted October 15, 2010 Hello, I am looking for a simple script to run a file through windows scheduler at the same time everyday. The file is for a piece of equipment that does not support NTP timing. You can telnet to this equipment through port 2024, but then a blank screen comes up. At this point you have to issue a TL1 login command, if successfule you will see the name of the unit and some verbage. At this point you can then issue the TL1 set-date/time commmand. I want to make it just set the time of day, my thoughts are put 1:00 am in the script and run it with windows scheduler at 1:00 in the morning everyday. There are about 20 of these units so I may need to stagger the scripts and make a script for each one. This is what I tried and what the TL1 command looks like, when I tried with a batch file the telnet screen does come up but that is it. It seems the TL1 commands aren't put in or the batch file is waiting on telnet or doesn't know what to do at this point. Any help is appreciated. telnet 192.168.1.1 2024 ACT-USER:MUX-FUJITSU:root:CIT001::root; SET-DAT:MUX-FUJITSU::CIT002::,010000; First line is telnet and the IP, then the specific port Second line is the TL1 login command, you will see the name "MUX-FUJITSU", the user "root", the command number "CIT001", the password "root" then semi colon is a return Third line is the TL1 set time and date command, you will see the name "MUX-FUJITSU", the command number "CIT002", the comma is there because I don't need the date, the 010000 is the time of the day format. Also the colons are needed. Link to comment Share on other sites More sharing options...
evilertoaster Posted October 15, 2010 Share Posted October 15, 2010 (edited) Your first sentence has some confusing terminology...it sounded like you want to make a script which creates a scheduled task, and the scheduled task runs a file...Although from the rest of your post it seems more like you simply want to make a script which runs as a scheduled task, which is arguably much easier:Sending commands to a dos prompt is usually as simple as using Run() to start the dos prompt (probably Run("cmd.exe")) and then using send()'s and wait()'s to simulate keystrokes. The helpfile is amply documented for these functions. Edited October 15, 2010 by evilertoaster Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now