Topic "Upload script works from command prompt, but not from job"

Author Message
Rookie1111
[View user's profile]

Joined: 2011-06-08
Posts: 2
This upload script (FTPS) works fine when I run it from the command prompt, but when I run the same command from a SQL Server scheduled job, it dies on an interactive request for a password from the host I am uploading to. The log file shows that when run from the command prompt, it runs using a modified stored session, but when run from the job, it uses an ad-hoc session. I suspect if I could get the job to use the modifed stored session, it would work, but I can't figure out how...I am a VERY novice user. This is running on WindowsServer 2003 by the way, and am using the current version of WinSCP - downloaded this week.

Script:
option batch abort
option confirm off
open something@someftp.gov -hostkey="key here"
put e:\ProdData\ftpexport\076\staging\*.re1
exit

Command:
"C:\Program Files\WinSCP\WinSCP.com" /script=e:\ProdData\ftpexport\076\scripts\076_ftpscript.scp /log=e:\ProdData\ftpexport\076\bak\ftptest.log
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Please read FAQ:
https://winscp.net/eng/docs/faq_scheduler
_________________
Martin Prikryl
Rookie1111
[View user's profile]

Joined: 2011-06-08
Posts: 2
prikryl wrote:


Thank you. I resolved the issue by making some changes to the SQL Server Agent, but this looks like the better method...I'd seen other postings about this but they were not as clear.
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