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

hatzeflats

I'm not quite sure what you mean. How could i set this up?
martin

Re: Solution

OK, but make sure you log the output of your batch file, not to have to fix problems like this with a trial and error.
hatzeflats

Solution

Nevermind i've found the solution.

I added
cd c:\<path to winscp>\ as first line of the batch file. that did the trick.
hatzeflats

starting script with the taskscheduler

Hello,

I'm running into an issue with running the winSCP scripts automatically with the windows taskscheduler. The schdeuler says that the job was completed succesfully however the files don't turn up in the correct directory.

I'm able to run the scripts manually. so i thought the error was in the task scheduler. To check this i made a simple batch script that writes an ping output to an .txt file.
@echo off

ping 8.8.8.8 > D:\scheduler_test_succesvol.txt
exit

But that one does work. So at this point i don't know if it's in the script or the task config.

So this is the batch script that is run by the taskscheduller.
winscp.com /script=GS1_Sync.txt

The above triggers this winSCP script.
option batch abort

option confirm off
open sftp://acc:pass@sftp:port/ -hostkey="hostkey="
synchronize local D:\Data\GS1_Data /outgoing
exit


This is how the taskscheduler is configured
General
X Run whether user is logged on or not
X Run with highest privileges
Triggers
Weekly sunday 23:59:59
Actions
Start a program
"path to the script"
Rest
Default

Can someone help me with this. I have the feeling i'm overlooking something very obvious. If you need more info please let me know.

Cheers,

Kevin[/img]