Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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

So once again, please implement some logging in your PowerShell script!
There are some hint here:
https://winscp.net/eng/docs/guide_debugging_scheduler#powershell
While they are not exactly focused at the kind off problem you are facing, they should still help to get some useful debugging information.
stanislav89

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
martin

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?)
stanislav89

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