Scheduled script stops working randomly

Advertisement

rweaver
Guest

Scheduled script stops working randomly

We've been using WinSCP successfully for several months with one frustrating issue. I have a very simple batch file that calls a WinSCP script and then makes a CURL request. This is scheduled to run very frequently (once per minute). This is run by Task Scheduler using my domain account.

winscp.com /script="script.txt" /log="FtpLogs/%date:~6,4%-%date:~3,2%-%date:~0,2%.txt" > ScriptOutput.txt
CURL -o CurlOutput.html -k https://127.0.0.1/some/url

Everything works perfectly for days and then, apparently randomly, the WinSCP script stops working - ScriptOutput.txt is empty and there is nothing appended to the log file. I can see that the batch file is executing fine, because the CURL request is still firing (so doesn't seem to be an issue with the scheduler). Also, if I run the batch file interactively everything works as expected (so also not apparently an issue with my domain user). However, the script just won't work when called from the scheduler.

The only thing I've found that resolves this is restarting the server.

Has anyone encountered this/got any advice?

Reply with quote

Advertisement

rweaver
Guest

Re: Scheduled script stops working randomly

Thanks for the update. I'll put some monitoring in to confirm I get exit code 3, and meanwhile +1 for the bug fix...

Reply with quote

Advertisement

You can post new topics in this forum