Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logi at a certain time - Script

Status
Not open for further replies.

Dphone

IS-IT--Management
Jun 6, 2003
220
US
On a PC with procomm already running. How do I get this script to wait for a certain time and then log itself in and run the script every 30 seconds for 30 minutes? The waituntil doesn't seem to work. And how do I make it run again in 30 seconds for 30 minutes?



;Waituntil "12:20:00" "10/08/07"

proc main

Transmit "****^M"
pause 1
Transmit "LOGI^M"
pause 1
transmit "4158^M"
waitfor ">"
transmit "LD 60^M"
waitfor "."
transmit "STAT^M"

endproc
 
I don't know anything about scripting, But what is the purpose of this script I can't see whats you hope to acomplish with it.

Why change the engine if all you need is to change the spark plugs.


 
look's like he wants to stat his T's automatically every 30 minutes.

Just prting history would show any PRI errors, bugs, etc.

 
It looks like a wast of time to me, I would just watch for the ERROR codes.

Why change the engine if all you need is to change the spark plugs.


 
We are doing a mass test calling for emergencies. I wanted to see how my trunks are handling the traffic.
 
No CDR on site.
This script will do it. The problem is I have to start the script sooner than I really need to. I will be away for about 3 or 4 hours. I only need to run it for about 30 minutes in the middle of that time.

proc main

pause 1
transmit "ld 60^M"

capture on

loop:
waitfor ". "

transmit "stat^M"

pause 5

goto loop

endproc

The problem is I have to start the script sooner than I really need to. I will be away for about 3 or 4 hours. I only need to run it for about 30 minute.
 
Why not just use LD 2 Traffic Reports, thats what there for.

Why change the engine if all you need is to change the spark plugs.


 
Thanks. I have set up a traffic report in LD 2.
 
you can use waitfor +the time, i have an example of that, but for a short 30 minute wait i would use the pause xxxx command.. i have used scripts instead of traffic reports at times because i just need one route.. so if i want a report for just a route with the acod of 2000 then i would
Code:
proc main

   transmit "logi name^M"
   waitfor "PASS?"
   transmit "pass^M"
   waitfor "> "
   transmit "ld 80^M"
   waitfor "."
capture on
loop:
   transmit "trac 0 2000^M"
  pause 300 ;3 minutes
goto loop

endproc
that one is as simple as they come.. i would not need to log back in for a 5 minute wait.. if needed i would move the loop up.. if i wanted more then a single file i would include a capture off command.. that script is freehand so it needs to be compliled..



john poole
bellsouth business
columbia,sc
 
RE: "How do I get this script to wait for a certain time and then log itself in..."
You could set up a SCHEDULED TASK from 'Control Panel' to run the script file at the desired date/time.


 
i always forget about task manager but i have used it.. it is one solution.. here's the string that i did not have at home yesterday''

Code:
string TimeStr             			; String to contain time.
   TimeStr = "06:59:59"       			; Assign time to time string.
   waituntil TimeStr 
   capture on

that one waits for the clock and can be used to do a call proc that waits for another time.. so it is chainable...

john poole
bellsouth business
columbia,sc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top