Did you check in Task Manager that there are no pending WinSCP process left behind?
- martin
No other client with CLI was tested. I can only say that when the connection starts to fail via scheduled task, it still works fine if ran interactively under the service account.
The application server has just been restarted, so it will take several days for it to start failing again, so I cannot reproduce the issue atm.
C:\Program Files (x86)\WinSCP\WinSCP.com /script=C:\OrgUnitExport\FTPscript\sync.txt /log=C:\OrgUnitExport\RunSync\WinSCP.log /ini=nul
option batch abort
option confirm off
open ftp://USER:PASS@10.40.140.111
synchronize local C:\OrgUnitExport\ /CA_OrgData
synchronize local C:\OrgUnitExport\ /CA_UserData
exit
. 2017-03-28 18:36:09.518 --------------------------------------------------------------------------
. 2017-03-28 18:36:09.518 WinSCP Version 5.7.2 (Build 5316) (OS 6.3.9600 - Windows Server 2012 R2 Standard)
. 2017-03-28 18:36:09.518 Configuration: nul
. 2017-03-28 18:36:09.518 Log level: Normal
. 2017-03-28 18:36:09.518 Local account: DOMAIN\SVC
. 2017-03-28 18:36:09.518 Working directory: C:\OrgUnitExport\RunSync
. 2017-03-28 18:36:09.518 Process ID: 3428
. 2017-03-28 18:36:09.518 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=572 /consoleinstance=_18192_197 "/script=C:\OrgUnitExport\FTPscript\sync.txt" "/log=C:\OrgUnitExport\RunSync\WinSCP.log" "/ini=nul"
. 2017-03-28 18:36:09.518 Time zone: Current: GMT+2, Standard: GMT+1 (Romance Standard Time), DST: GMT+2 (Romance Daylight Time), DST Start: 26-03-2017, DST End: 29-10-2017
. 2017-03-28 18:36:09.518 Login time: 28. marts 2017 18:36:09
. 2017-03-28 18:36:09.518 --------------------------------------------------------------------------
. 2017-03-28 18:36:09.518 Script: Retrospectively logging previous script records:
> 2017-03-28 18:36:09.518 Script: option batch abort
< 2017-03-28 18:36:09.518 Script: batch abort
< 2017-03-28 18:36:09.518 Script: reconnecttime 120
> 2017-03-28 18:36:09.518 Script: option confirm off
< 2017-03-28 18:36:09.518 Script: confirm off
> 2017-03-28 18:36:09.518 Script: open ftp://USER:***@10.40.140.111
. 2017-03-28 18:36:09.518 --------------------------------------------------------------------------
. 2017-03-28 18:36:09.518 Session name: USER@10.40.140.111 (Ad-Hoc site)
. 2017-03-28 18:36:09.518 Host name: 10.40.140.111 (Port: 21)
. 2017-03-28 18:36:09.518 User name: USER (Password: Yes, Key file: No)
. 2017-03-28 18:36:09.518 Transfer Protocol: FTP
. 2017-03-28 18:36:09.518 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2017-03-28 18:36:09.518 Disable Nagle: No
. 2017-03-28 18:36:09.518 Proxy: none
. 2017-03-28 18:36:09.518 Send buffer: 262144
. 2017-03-28 18:36:09.518 UTF: 2
. 2017-03-28 18:36:09.518 FTP: FTPS: None; Passive: Yes [Force IP: A]; MLSD: A [List all: A]
. 2017-03-28 18:36:09.518 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-03-28 18:36:09.518 Cache directory changes: Yes, Permanent: Yes
. 2017-03-28 18:36:09.518 Timezone offset: 0h 0m
. 2017-03-28 18:36:09.518 --------------------------------------------------------------------------
. 2017-03-28 18:36:09.518 Connection failed.