Re: Scheduled Task running script failing Windows 10
I have added this issue to the tracker:
https://winscp.net/tracker/2005
https://winscp.net/tracker/2005
. 2021-07-19 16:11:19.591 WinSCP Version 5.19.1 (Build 11552) (OS 10.0.17763 - Windows Server 2019 Standard)
. 2021-07-19 16:11:19.591 Configuration: nul
. 2021-07-19 16:11:19.591 Log level: Debug 2
. 2021-07-19 16:11:19.591 Local account: hostname\user
. 2021-07-19 16:11:19.591 Working directory: C:\Windows\system32
. 2021-07-19 16:11:19.591 Process ID: 8952
/console
) or the process just hanging (without /console
), seemingly doing nothing. The logs showed reported it was getting stuck just after reporting its Process ID into the log. I could verify this and see the process sitting there consuming CPU but not any network traffic.
/log
to /logxml
- I only found this because I was trying to find more details in the log to determine the issue.
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /log="C:\Users\username\WinSCP-backup-script.log" /ini=nul /script="C:\Users\username\WinSCP-backup-script.script"
open sftp://user@000.111.222.333/ -hostkey="ssh-ed25519 255 [alphanumeric-code]" -privatekey="C:\Users\user\SSHKeys\ssh-private-key.ppk"
cd /home/data/backup
lcd H:\!SFTP_Backups
get -speed=2048 -neweronly *
exit
# Execute the script using a command like:
# "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /script="C:\path\to\script\script.txt"
/log="C:\Users\username\WinSCP-backup-script.xml" /ini=nul /script="C:\Users\username\WinSCP-backup-script.script"
/xmllog=
and it suddenly began working. Same log folder/permissions, nothing else changed.
. 2021-07-07 21:29:37.828 --------------------------------------------------------------------------
. 2021-07-07 21:29:37.828 WinSCP Version 5.19.1 (Build 11552) (OS 10.0.19041 - Windows 10 Enterprise)
. 2021-07-07 21:29:37.828 Configuration: nul
. 2021-07-07 21:29:37.829 Log level: Normal
. 2021-07-07 21:29:37.829 Local account: COMPUTERNAME\username
. 2021-07-07 21:29:37.829 Working directory: C:\Users\username
. 2021-07-07 21:29:37.829 Process ID: 28360