New to Forum - killing commands before default timeout
Posted: 02 Nov 2011 12:10
I write batch occasionally for fun occasionally for work
I'm handy with Win_32 command line but still need some help occasionally
I've been writing a few scripts for work as of late and am looking for some help in tweaking them
one script I have looks for an RDP session with QWINSTA
it searches about 60 citrix terminal servers in total, the only issue I run into is day to day usually a few servers are down at any given time and the timeout for the query seems to be a good 10-15 seconds before it reports that RPC is unavailable.
looking for a way to kill the command after say 2 seconds and just echo an error , and move on the next label via "goto"
here is a sample
:Start
ECHO -------------------------------------
ECHO ISMETA01
QWINSTA /Server:ismeta01 %profile%
Goto Next Server1
:Next Server1
ECHO -------------------------------------
ECHO ISMETA02
QWINSTA /Server:ismeta02 %profile%
Goto Next Server2
I'm handy with Win_32 command line but still need some help occasionally
I've been writing a few scripts for work as of late and am looking for some help in tweaking them
one script I have looks for an RDP session with QWINSTA
it searches about 60 citrix terminal servers in total, the only issue I run into is day to day usually a few servers are down at any given time and the timeout for the query seems to be a good 10-15 seconds before it reports that RPC is unavailable.
looking for a way to kill the command after say 2 seconds and just echo an error , and move on the next label via "goto"
here is a sample
:Start
ECHO -------------------------------------
ECHO ISMETA01
QWINSTA /Server:ismeta01 %profile%
Goto Next Server1
:Next Server1
ECHO -------------------------------------
ECHO ISMETA02
QWINSTA /Server:ismeta02 %profile%
Goto Next Server2