Topic ""Host does not exist" when run from Task Scheduler"

Author Message
marksw
[View user's profile]

Joined: 2016-07-21
Posts: 1
Hi, I'm trying to automate FTP file synchronisation by running a batch file from Task Scheduler (currently on Windows 2008R2 server).

The batch file I'm trying to run contains the following:
Code:
WinSCP.com /Console /Script=WinSCP_SyncRA_CV_script.txt


The script file it is referencing simply contains this:
Code:
open RA_CV_Storage_FTP
synchronize local
close
exit


When I manually run the batch file everything works perfectly.
However, when I run it via Task Scheduler the batch file appears to run because it writes to log file but I get the following:
Code:
Searching for host...
Host "RA_CV_Storage_FTP" does not exist.


Anybody have any ideas what might be going on?
GTSageDev
[View user's profile]

Joined: 2012-11-14
Posts: 7
Location: United Kingdom
Is the WinSCP.ini file in the same folder as WinSCP.exe? Does the scheduled job have that as it's working folder? My guess is that there's no site named RA_CV_Storage_FTP in the ini file, so it's treating it as a domain name.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Please start here:
https://winscp.net/eng/docs/faq_scheduler
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License