nerdexam
CompTIACompTIA

XK0-005 · Question #309

XK0-005 Question #309: Real Exam Question with Answer & Explanation

The correct answer is B: crontab -e -u joe. To set up a cron job for a specific user like Joe, the systems administrator should use the crontab -e -u joe command, which allows editing the user's crontab file.

System Management

Question

Joe, a user, asks a systems administrator to schedule the daily execution of a custom script. Which of the following commands will allow the systems administrator to set up Joe's cron job?

Options

  • Acrontab -r -u joe
  • Bcrontab -e -u joe
  • Ccrontab -n -u joe
  • Dcrontab -l -u joe

Explanation

To set up a cron job for a specific user like Joe, the systems administrator should use the crontab -e -u joe command, which allows editing the user's crontab file.

Common mistakes.

  • A. The crontab -r -u joe command removes all cron jobs for the user "joe" without prompting, which is destructive and not for setting up new jobs.
  • C. The crontab command does not have a -n option; this is not a valid flag for managing cron jobs.
  • D. The crontab -l -u joe command lists the existing cron jobs for the user "joe", but it does not allow for adding or editing new jobs.

Concept tested. Managing user cron jobs

Reference. https://man7.org/linux/man-pages/man1/crontab.1.html

Topics

#cron#task scheduling#system administration#crontab command

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions