martin wrote:
Thanks for sharing your solution.
Anytime! I have a follow-up Martin and need some assistance....
I'm running WINSCP on Server 2003, moving files back and forth between my internal network and DMZ network. I'm accomplishing this through scheduled jobs that call my batch files which in turn call my script. Everything works perfectly. I can launch the batch files manually, and they perform as expected, I can schedule the batch jobs, and again they peform as they should. The issue I have now identified, the last piece of the puzzle, is that when I log off the server, the jobs no longer run. If I Remote Desktop to the server, and click the X to kill my session, the jobs still run because technically my profile is still logged on. Any idea of how I can have the scheduled jobs continue to run while logged off? This I thought would have been the easiest part of this process!
My scheduled job calls this batch file:
start "" "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /script=C:\WINSCP_Test_Scripts_12_22_13\FromFTPServer.txt
/log="C:\WINSCP_Test_Scripts_12_22_13\FromFTP.log"
#PAUSE
exit
FromFTPServer.TXT Contents:
open sftp://LOCALUSERNAME:PWD@IPADDRESS
cd /home/LOCALUSERNAME/incoming/
option transfer binary
option confirm off
lcd \\InternalServer\InternalDirectory
get INCOMINGFILE.TXT INCOMINGFILE.TXT -delete
#end script
#close
exit
Works perfectly while logged in. I included all code, but really I think it's something with the actual batch file being called. The Run As is a local admin and has full access to all directories.
Any asistance is greatly appreciated!!!!
Thanks,
Mike