LFCS · Question #521
Which of the following is the main difference between the batch and at commands?
The correct answer is B. The batch command will run when system load is low. The main difference between batch and at commands is that batch runs jobs when the system load is low, while at runs jobs at a specific time regardless of load.
Question
Options
- AThe batch command will run multiple times.
- BThe batch command will run when system load is low.
- CThe at command reads commands from standard input.
- DThe at command emails results to the user.
How the community answered
(40 responses)- A3% (1)
- B88% (35)
- C5% (2)
- D5% (2)
Why each option
The main difference between `batch` and `at` commands is that `batch` runs jobs when the system load is low, while `at` runs jobs at a specific time regardless of load.
Both `batch` and `at` commands typically schedule a job for a single execution at a specified time or condition, not multiple times unless explicitly rescheduled.
The `batch` command schedules jobs to execute only when the system's load average falls below a specific threshold (typically 0.8 or 1.5, depending on the system's configuration), which helps prevent additional strain on an already busy system.
Both the `at` and `batch` commands, by default, read the commands to be executed from standard input.
Both `at` and `batch` commands are configured to email the standard output and standard error of the executed commands to the user who submitted them, provided the mail system is properly set up.
Concept tested: Linux job scheduling (at vs. batch)
Source: https://man7.org/linux/man-pages/man1/at.1.html
Topics
Community Discussion
No community discussion yet for this question.