← 返回命令列表

Linux command

batch 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

batch

Example

echo "./backup.sh" | batch

说明

batch executes commands when system load levels permit. It queues jobs to run when the system load average drops below a configurable threshold (default 1.5), making it useful for scheduling non-urgent or resource-intensive tasks during low-usage periods. Unlike `at` which runs commands at a specific time, `batch` waits for favorable system conditions. Commands are read from standard input, and output is mailed to the user upon completion. The `atd` daemon must be running to process queued jobs.

FAQ

What is the batch command used for?

batch executes commands when system load levels permit. It queues jobs to run when the system load average drops below a configurable threshold (default 1.5), making it useful for scheduling non-urgent or resource-intensive tasks during low-usage periods. Unlike `at` which runs commands at a specific time, `batch` waits for favorable system conditions. Commands are read from standard input, and output is mailed to the user upon completion. The `atd` daemon must be running to process queued jobs.

How do I run a basic batch example?

Run `batch` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more batch examples?

This page includes 2 examples for batch, plus related commands for nearby Linux tasks.