- @참고: https://www.delftstack.com/howto/batch/batch-file-wait-for-command-to-finish/

 

1. Use /WAIT to Wait for a Command to Finish Execution

/B : use to stay in the same process without creating a new window.

cmd /k : used to prevent the command prompt from exiting after execution.

@echo off
echo starting first program
START /B /WAIT cmd /c "C:\Users|Aastha Gas Harda\Desktop\testfile1.bat" > output.txt
echo The first program is executed successfully.
START /B systeminfo >> output.txt
echo ALL the programs are executed successfully
cmd /k

 

2. Use the TIMEOUT Command to Delay the Execution

time -1 : it wil act as a puase command to wait until a key is pressed.

/nobreak : to prevent user keystrokes.

- syntax

TIMEOUT /t <time (sec)>
@echo off
echo starting first program
START /B JRuler.exe
TIMEOUT /t 30
echo The first program is executed successfully.
START /B systeminfo >> output.txt
echo All the programs are executed successfully.
cmd /k

 

3. Use the PAUSE Command to Pause the Execution

puase the execution of a batch file until a key is pressed.

@echo off
echo starting first program
START /B cmd /c "C:\Users\Aastha Gas Harda\Desktop\testfile1.bat" > output.txt
echo The first program is executed successfully.
PAUSE
START /B systeminfo >> output.txt
echo All the programs are executed successfully
cmd /k

'Build' 카테고리의 다른 글

[Gradle] compile vs implementation  (0) 2022.03.14
블로그 이미지

uchacha

개발자 일지

,

- @참고: https://compogetters.tistory.com/64

 

api(compile)

project에 의해 노출되는 API의 부분인 project의 production 소스를 compile 하는데 필요한 dependency 이다. 예를 들어 project가 Guava를 사용하고, Guava 클래스의 public interface를 method signature에 노출한다.

 

implementation

project에 의해 노출되는 API의 부분이 아닌 project의 production 소스를 compile 하는데 필요한 dependency 이다. 예를 들어 project가 내부 persistence layer 구현으로 Hibernate 를 사용한다.

 

둘 다 사용을 위해 컴파일이 필요하지만 API의 노출 여부에 차이가 있다.

compile은 연결된 API 모두가 프로젝트에 의해 노출이 되고

implementation은 노출되지 않는다.

블로그 이미지

uchacha

개발자 일지

,