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?