이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 7. Batch Processing


Batch processing allows multiple operation requests to be grouped in a sequence and executed together as a unit. If any of the operation requests in the sequence fail, the entire group of operations is rolled back.

Note

Batch mode does not support conditional statements.

  1. Enter batch mode with the batch management CLI command.

    batch

    Batch mode is indicated by the hash symbol (#) in the prompt.

  2. Add operation requests to the batch.

    Once in batch mode, enter operation requests as normal. The operation requests are added to the batch in the order they are entered.

    You can edit and reorder batch commands. You can also store a batch for processing at a later time. See Batch Mode Commands for a full list of commands available for working with batches.

  3. Run the batch.

    Once the entire sequence of operation requests is entered, run the batch with the run-batch command.

    run-batch

    The entered sequence of operation requests is completed as a batch and prints the result to the terminal: The batch executed successfully.

Batch Commands in External Files

Frequently-run batch commands can be stored in an external text file and can be loaded either by passing the full path to the file as an argument to the batch command or executed directly by being passed as an argument to the run-batch command.

You can create a batch command file by using a text editor and placing each command on its own line.

The following command will load the myscript.txt file in batch mode. The commands from this file can then be edited or removed. New commands can be inserted. Changes made in this batch session do not persist to the myscript.txt file.

batch --file=myscript.txt

The following will immediately run the batch commands stored in the file myscript.txt

run-batch --file=myscript.txt

The entered sequence of operation requests is completed as a batch.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.