WinSCP command doesn't execute in scheduled batch file intermittently

Advertisement

gbuchner
Joined:
Posts:
4
Location:
Minnesota

WinSCP command doesn't execute in scheduled batch file intermittently

We have a batch file, runs every 4 hours via Task Scheduler, but occasionally when it gets to the part in the batch where it executes the WinSCP command, it just stops there. I have the batch file set to send output to a log file so I can troubleshoot, along with another log file for any connection issues (added recently when this issue started appearing). This is the last part of what shows up in the log file. Anything in the log file after this is from the next scheduled run.
Z:\>C:

C:\>CD C:\Databasics 

C:\Databasics>C:"\Program Files (x86)\WinSCP\WinSCP.com" /log=c:\DatabasicsLog\ConnectionLog.txt /loglevel=0 /command "option batch abort" "option confirm off" "open sftp://<username>:<password>@<ftptsite>.net -rawsettings SendBuf 0" "cd data" "put -resumesupport=off *.zip" "exit"
Any ideas as to why this does not execute sometimes? I do have the task set to end after an hour if it is still running, and the task does keep running until it is killed.

All of the settings are what I have gotten from research here troubleshooting other issues and it's been working fine for several months. I have been thinking that this might have come because of a Windows Update.

WinSCP version: 5.19.4, I do plan to update soon, I have a Change order in for that.

Reply with quote

Advertisement

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

Re: WinSCP command doesn't execute in scheduled batch file intermittently

Is the ConnectionLog.txt created? Can you post it?
If not, does WinSCP.com output anything? Is there a stuck winscp.com/winscp.exe process?

Reply with quote

gbuchner
Joined:
Posts:
4
Location:
Minnesota

Re: WinSCP command doesn't execute in scheduled batch file intermittently

Hi Martin, thank you for replying.

Yes, it is created, but nothing gets dumped into this file when it doesn't run. Basically the command is executed in the batch file, but nothing happens. It just stops there. The log file I create from the batch file doesn't contain anything further until the next time it runs. I haven't checked to see if there were any stuck processes, I'll make certain to do that the next time this happens. It's random that it doesn't work, so I'm not always around when it doesn't.

Did update to the latest version of WinSCP. This does not appear to have changed the issue.

Reply with quote

gbuchner
Joined:
Posts:
4
Location:
Minnesota

Hi Martin,

It finally happened again when I could check it right away. No output, no stuck process.

The command seems to get executed from the command line script, but doesn't process. And it's totally random.

Reply with quote

Advertisement

gbuchner
Joined:
Posts:
4
Location:
Minnesota

And of course, this has not happened since then. I do think this was an issue that was introduced by a Windows update and that the recent Windows updates may have corrected whatever the issue was.

I'll keep a watch on it, but otherwise, nothing new to go on.

Thank you very much for answering my question and providing me leads to look at.

Reply with quote

Advertisement

You can post new topics in this forum