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

kamui

I made the correction: ssh-rsa "2048 ssh-rsa 2048".

I was able to generate log but executed bat manually. The log shows no error. But running in Task Scheduler does not generate log, it seems the script does not run.

I tested the same on 2 different computers, it did not work.
I have other bats from other applications running this way.

I am using my own account to run the script and its path is local.

Anything else I can check?

Thanks for your help!!!!
kamui

script .bat does not run with windows task scheduler

Hello,
I have a script that works when I run manually. But when I start with the Windows Task Scheduler it does not work. Can you help me?

My bat: SyncToLocalScript.bat
"C:\Program Files (x86)\WinSCP\winscp.com"/script="SyncToLocalScript.txt"
quit

My Script: SyncToLocalScript.txt
option batch abort
option confirm off
open sftp://username:password@IP -hostkey="ssh-rsa 2048 ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
synchronize local C:\sftp /
exit