reconnect when connection times out?

Advertisement

Homerboy
Guest

reconnect when connection times out?

. 2013-12-27 10:37:56.999 Looking up host "XXXXXXXXXX"
. 2013-12-27 10:38:22.770 Connecting to 165.XXX.XXX.XXX port 22
. 2013-12-27 10:38:43.783 Failed to connect to 165.XXX.XXX.XXX: Network error: Connection timed out


Believe it or not, when trying to connect to a gov't FTP, it is very often offline.
Is there a way to script an attempted re-connect when the connection times out?
I hate coming in Monday morning and finding my files didn't up/download over the weekend :(

Thanks in advance.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: reconnect when connection times out?

WinSCP does not support this.
But you can easily loop whole script from a batch file when it fails:

:start
winscp.com /script=...
if errorlevel 1 goto start

Reply with quote

Homerboy
Guest

Actually, it seems that the problem I am having is that when the desktop is locked (Win2008 Server set to lock desktop after 15 minutes of inactivity) is when the WinSCP has an issue connecting.

If the desktop is not locked, and the script kicks off, it connects fine. If the desktop is locked and the script kicks off then it can not connect to the remote site.

Not sure why. Anyone have any thoughts?

Reply with quote

Advertisement

You can post new topics in this forum