Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int executeBatch() {
- logger.info("executeBatch() - Send Email Alert Start");
- try {
- alertTransactionMgr.sendEmailAlert();
- } catch (Exception e) {
- throw new Exception(e);
- }
- logger.info("executeBatch() - Send Email Alert End");
- return 0;
- }
- public int execute() {
- this.trx = createTransaction();
- try {
- returnCode = executeBatch();
- } catch (Exception e) {
- printLogErrorMsg("Job Failed caused by the Exception.", e);
- returnCode = -1;
- trx.setStatus("Failure");
- updateBatchTransaction(trx);
- }
- return returnCode;
- }
- @echo off
- set ERRLVL=0
- java -cp %CLASSPATH% com.test.runner.MainBatchRunner
- if not (%ERRORLEVEL%)==() (
- set ERRLVL=%ERRORLEVEL%
- )
- echo Delete Files that are more than 30 old
- forfiles /p "%BATCH_LOG_DIR%" /s /m %2*.log /d -%ARCHIVE_DAYS% /c "cmd /c echo del %BATCH_LOG_DIR%@file"
- forfiles /p "%BATCH_LOG_DIR%" /s /m %2*.log /d -%ARCHIVE_DAYS% /c "cmd /c del %BATCH_LOG_DIR%@file"
- echo Program exit %ERRLVL%
- echo Program exit %ERRLVL% >> %BATCH_LOG_FILE%
- exit /B %ERRLVL%
Advertisement
Add Comment
Please, Sign In to add comment