nerdexam
CompTIA

LX0-104 · 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 distinction between batch and at commands is that batch executes jobs only when the system load average is low, whereas at runs jobs at a specific scheduled time regardless of system load.

Shells, Scripting and Data Management

Question

Which of the following is the main difference between the batch and at commands?

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

(29 responses)
  • A
    7% (2)
  • B
    90% (26)
  • D
    3% (1)

Why each option

The main distinction between `batch` and `at` commands is that `batch` executes jobs only when the system load average is low, whereas `at` runs jobs at a specific scheduled time regardless of system load.

AThe batch command will run multiple times.

Neither the `batch` nor `at` command runs multiple times by default; they are designed for single, scheduled executions.

BThe batch command will run when system load is low.Correct

The `batch` command is designed to execute jobs when the system's load average drops below a certain threshold (typically 0.8), ensuring that resource-intensive tasks do not negatively impact system performance during peak usage.

CThe at command reads commands from standard input.

Both `batch` and `at` commands can read commands from standard input if a file is not specified, so this is not a distinguishing difference.

DThe at command emails results to the user.

Both `at` and `batch` commands typically email the results of the executed job to the user who scheduled it, making this a shared feature rather than a main difference.

Concept tested: Linux job scheduling (at vs batch)

Source: https://man7.org/linux/man-pages/man1/at.1.html

Topics

#at command#batch command#job scheduling#system load

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice