Scheduled PowerShell script for download cuts off at random time.

Advertisement

stanislav89
Joined:
Posts:
2

Scheduled PowerShell script for download cuts off at random time.

Hello,

I have scheduled a PowerShell script to download files from an FTP every week in Windows Task Scheduler.
The script on its own works fine. Even when I run the scheduled task manually it works as expected. However when left to run at the scheduled time it starts but does not download all the files. Looking at the logs it just looks like it randomly stops at some point.
The task history shows as the task completed successfully

Attaching the logs of a successful full download of all the files and a log of the cut off download, screenshots of the task history (full download and partial download) and the script itself.

The version of WinSCP I am using is 6.1.2.0. I updated it last month to see if it will resolve the issue, however it still persists.

Can someone please assist, as this is causing a major headache for us. It seemed to work fine in the first couple of months we set upped this – back in May. However since September we observe this issue.

Thank you

Reply with quote

Advertisement

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

Re: Scheduled PowerShell script for download cuts off at random time.

So did you do any debugging in your PowerShell code?
Does whole PowerShell script get somehow terminated?
Or is it just the WinSCP code that aborts? (and the PowerShell script runs further?)

Reply with quote

stanislav89
Joined:
Posts:
2

Re: Scheduled PowerShell script for download cuts off at random time.

The script itself is working. I have run it numerous time against the same FTP server to download the files when the scheduled download did not download them all. And it never failed.
Since I only observer this issue during the scheduled task I have no visibility of the script as it is running. All I can see is the log afterword's that the download just cuts off.
If there is a more detailed log I can generate that might help troubleshoot?

Thank you

Reply with quote

Advertisement

You can post new topics in this forum