我在运行厨房时遇到问题。
@echo off
setlocal enableDelayedExpansion
REM IF EXIST "%ProgramFiles(x86)%Transform.exe"
SET Transform="%ProgramFiles(x86)%Transform.exe"
set tmpDate=%date%
set tmpTime=%time: =0%
set varDate=%tmpDate:~6,4%%tmpDate:~3,2%%tmpDate:~0,2%
set varTime=%tmpTime:~0,2%%tmpTime:~3,2%%tmpTime:~6,2%
set varDateLog=%tmpDate:~0,2%/%tmpDate:~3,2%/%tmpDate:~6,4%
set varTimeLog=%tmpTime:~0,2%:%tmpTime:~3,2%:%tmpTime:~6,2%
set Traitement=%~n0%~x0
set "varKettleDir=%ProgramFiles(x86)%PENTAHO_data-integration";%varKettleDir%
set varDir=%HOMEDRIVE%Tempadvansbicm
set varLog=%varDir%logBatch
set LOG=%varLog%AdvansCam_%varDate%_%varTime%.log
set ADV_ETL_CLIENT=%HOMEDRIVE%SVNADV_ETL_CLIENT_REP
REM %Transform% -s:"%~f1" -xsl:"%~dpn0.xsl" 2>NUL
REM ENDLOCAL
REM GOTO:EOF
REM :Syntax
REM
echo %varDateLog% %tmpTime:~0,2%:%tmpTime:~3,2%:%tmpTime:~6,2% ^| ... Erreur : Le paramètre Date arreté n'est pas présent >> %LOG%
echo %varLog%Advans_CamInit%~x0^| Debut du traitement >> %LOG%
echo ~x0=%~x0 >> %LOG%
echo ~x=%~n0%~x0 >> %LOG%
rem -- PENTAHO DATA INTEGRATION
REM set varPentaho= "%varKettleDir%kitchen.bat /file:%ADV_ETL_CLIENT%J_STG_push.kjb /level:Basic > %varLog%JobCamClient_%varDate%_%varTime%.log"
REM call %varPentaho% && echo %varPentaho% "OK" || echo %varPentaho%"NOK" >> %LOG%
REM echo Debut du traitement >> %LOG%
cmd kitchen.bat /file:%ADV_ETL_CLIENT%J_STG_push.kjb /level:Basic > %varLog%JobCamClient_%varDate%_%varTime%.log" && echo "OK" || echo "NOK" >> %LOG%
尝试使用此行:
call kitchen.bat /file:%ADV_ETL_CLIENT%J_STG_push.kjb /level:Basic > %varLog%JobCamClient_%varDate%_%varTime%.log" && (
echo "OK">>%LOG%
) || (
echo "NOK" >> %LOG%
)
而不是您的最后一个。