Guest User

Untitled

a guest
Jul 14th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. public int executeBatch() {
  2. logger.info("executeBatch() - Send Email Alert Start");
  3. try {
  4. alertTransactionMgr.sendEmailAlert();
  5. } catch (Exception e) {
  6. throw new Exception(e);
  7. }
  8. logger.info("executeBatch() - Send Email Alert End");
  9. return 0;
  10. }
  11.  
  12. public int execute() {
  13.  
  14. this.trx = createTransaction();
  15.  
  16. try {
  17. returnCode = executeBatch();
  18.  
  19. } catch (Exception e) {
  20. printLogErrorMsg("Job Failed caused by the Exception.", e);
  21. returnCode = -1;
  22. trx.setStatus("Failure");
  23. updateBatchTransaction(trx);
  24.  
  25. }
  26. return returnCode;
  27. }
  28.  
  29. @echo off
  30.  
  31. set ERRLVL=0
  32.  
  33. java -cp %CLASSPATH% com.test.runner.MainBatchRunner
  34. if not (%ERRORLEVEL%)==() (
  35. set ERRLVL=%ERRORLEVEL%
  36. )
  37.  
  38. echo Delete Files that are more than 30 old
  39. forfiles /p "%BATCH_LOG_DIR%" /s /m %2*.log /d -%ARCHIVE_DAYS% /c "cmd /c echo del %BATCH_LOG_DIR%@file"
  40. forfiles /p "%BATCH_LOG_DIR%" /s /m %2*.log /d -%ARCHIVE_DAYS% /c "cmd /c del %BATCH_LOG_DIR%@file"
  41.  
  42. echo Program exit %ERRLVL%
  43. echo Program exit %ERRLVL% >> %BATCH_LOG_FILE%
  44.  
  45. exit /B %ERRLVL%
Advertisement
Add Comment
Please, Sign In to add comment