|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem Running FTP Script Task
I am having a problem getting a command line FTP script to work in a Scheduled Task on a WK3 server. The command works fine when run from the command prompt (when logged in as me [MYDOMAIN\bobr]). However, when it is run as a scheduled task (MYDOMAIN\svc_account_FTP), the status/log shows that the task successfully ran (code 0x2) even though the results do not actually occur. The command should result in two deliverables: 1) A file (iweb.access.MMDDYY.gz) successfully FTPed from www.iweb.mycompany.com and placed into H:\MaxData\bobtest; and 2) An FTP log file created (iweb_get_yesterday_ftp.log) from the FTP session and placed into H:\MaxData\bobtest. When this is run at the command line using the following commands, it works successfully: Start - Run - CMD C:\>H: H:\>cd MaxData\bobtest H:\MaxData\bobtest>ftp -s:FTP_Test_iWeb.txt www.iweb.mycompany.com > iweb_get_yesterday_ftp.log Here's the contents of the task command and script file: C:\WINDOWS\system32\ftp.exe -s:FTP_Test_iWeb.txt www.iweb.mycompany.com > iweb_get_yesterday_ftp.log <FTP_Test_iWeb.txt> myuser mypswd cd /usr/webstats/logs/tmp bin prompt mget * quit </FTP_Test_iWeb.txt> Start in: H:\MaxData\bobtest Run as: MYDOMAIN\svc_account_FTP Among the things I tried were giving the "run as" account Modify perms on H:\>MaxData\bobtest; and also by running the task as an administrator. I've also performed an all-drive search for each of the expected filenames. <LogEntry> "MKP FTP iWeb.job" (ftp) Started 10/30/2007 1:10:46 PM "MKP FTP iWeb.job" (ftp) Finished 10/30/2007 1:10:46 PM Result: The task completed with an exit code of (2). </LogEntry> Can you help me solve this mystery? TIA, Bob -- webguybob-nospam@hotmail.com |
|||||||||||||||||||||||