Product SiteDocumentation Site

18.2.2. batch ジョブの設定

To execute a one-time task when the load average is below 0.8, use the batch command.
After typing the batch command, the at> prompt is displayed. Type the command to execute, press Enter, and press Ctrl+D . Multiple commands can be specified by typing each command followed by the Enter key. After typing all the commands, press Enter to go to a blank line and press Ctrl+D . Alternatively, a shell script can be entered at the prompt, pressing Enter after each line in the script, and pressing Ctrl+D on a blank line to exit. If a script is entered, the shell used is the shell set in the user's SHELL environment, the user's login shell, or /bin/sh (whichever is found first). As soon as the load average is below 0.8, the set of commands or script is executed.
標準出力に情報を表示するコマンドやスクリプトを入力した場合、この出力はユーザーに電子メールで送信されます。
Use the command atq to view pending jobs. Refer to 「保留ジョブの表示」 for more information.
Usage of the batch command can be restricted. For more information, refer to 「at と batch へのアクセスの制御」 for details.