0

I have to call two bat files.

One name cbpp_job and other upload.bat.

In first .bat files, I have called cbppservice.exe and after that I have call upload.bat.

cbpp_job.bat

call d:\csdb_exe\CBPPService.exe
call ftp -n -s:"d:\csdb\Success\upload.bat" xxxx.produrl.com

upload.bat

user XXXXXX
XXXXXXXXX

PUT ZA1P.FTP.CBPP.INTRFACE.GRP(+1) 'ZA1P.FTP.CBPP.INTRFACE.GRP(+1)'
BYE

EXIT

But when I call csdb_job through command prompt it works well. When I scheduled it in task scheduler it only calls cbppservice.exe and it is not doing the ftp.

The operating System is windows server 2008.

4

1 回答 1

2

如果您的事件查看器没有向您显示脚本失败的原因,请尝试修改cbpp_job.bat以将 stderr 重定向到日志文件。

(
    d:\csdb_exe\CBPPService.exe
    ftp -n -s:"d:\csdb\Success\upload.bat" xxxx.produrl.com
) 2>"c:\csdbtask.log"

也许这会帮助你弄清楚为什么任务调度程序失败了。

于 2013-04-08T15:04:43.610 回答