Post a reply

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

Pablohoney92

Task Scheduler Server 2019

Hi I am trying to automate an upload of 2 csv files that get updated to a remote server from my application server. The remote server connection is using SSH key which I have setup correctly, I have created a batch file:
open sftp://xxxxxxxxxxx@sftp.cmh.xxxxeapp.com/ -hostkey="ssh-rsa 2048 p3J5wTubReewshJFWI7XqiGb480UsJlh2HdgfhgehjJKDk211" -privatekey="C:\ftp\wsftp_private.ppk" -passphrase="houseoflove"
 
lcd "C:\Program Files\xxxMaker\xxxxx Server\Data\Documents\bridge"
cd /files
put *
exit
# Execute the script using a command like:
# "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /script="C:\path\to\script\script.txt"

When I schedule this batch file, I can't get it to run – I'm assuming that the # is commented out which might be the reason its not working.

In task scheduler, I see a (0x2331) code in Last Run Result

Any suggestions? thanks!