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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net::telnet

Status
Not open for further replies.

malpa

Technical User
Feb 8, 2004
122
CO
Hi

I want to run a remote command using net::telnet. This command generate a local file for example "ls C*". if this command does not generate a file or the file is empty (0), I must to run this command again 5 minutes later, thus until it obtains the firts file of day.

My program generate one file per day, but some days the file is empty.

My program run all days at 6:00 am.

What would be the solution to this?


Thanks malpa
 
Leaving the session open for that long is bad. I would start a new telnet session every 5 minutes to check for the file.

for (0..288){
#Telnet to the machine
#if file find, last
#else
sleep 300;
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top