Reputation: 1
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.
Upvotes: 0
Views: 992
Reputation: 24466
If your event viewer doesn't show you why your script is failing, Try modifying cbpp_job.bat to redirect stderr to a log file.
(
d:\csdb_exe\CBPPService.exe
ftp -n -s:"d:\csdb\Success\upload.bat" xxxx.produrl.com
) 2>"c:\csdbtask.log"
Maybe that'll help you figure out why task scheduler is failing.
Upvotes: 2