mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A cron job runs a script that produces output,…
A cron job runs a script that produces output, but the administrator does not receive the expected email notification. Which is the most likely cause?
⚠ Common exam trap
CompTIA often tests the distinction between variables that affect script execution (PATH) versus those that control cron's mail behavior (MAILTO), leading candidates to mistakenly choose PATH or executable permissions when the issue is specifically about email delivery.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
MAILTO variable is not set in the crontab.
The MAILTO variable in a crontab specifies the email address to which cron sends the output (stdout/stderr) of a job. If MAILTO is not set, cron defaults to mailing output to the owner of the crontab (the user who created it). However, if the administrator expects notifications at a different address, the missing MAILTO variable would prevent that specific email from being sent. This is the most direct cause of not receiving the expected email notification.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The script uses absolute paths for all commands.
Why it's wrong here
Using absolute paths is good practice and does not prevent email delivery.
- ✓
MAILTO variable is not set in the crontab.
Why this is correct
Cron only sends output to the address specified in MAILTO; if not set, output is lost.
- ✗
The PATH environment variable is not set.
Why it's wrong here
Missing PATH could cause commands within the script to fail, but any error output would still be e-mailed if MAILTO is set.
- ✗
The script is not executable.
Why it's wrong here
If the script were not executable, it would not run at all; the cron job would produce an error instead of output.
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
Output
In IT service management, output is the result or deliverable produced by a process, system, or component, such as data, reports, or services delivered to a customer.
Key term
crontab
Crontab is a time-based job scheduler in Unix-like operating systems that allows users to automate the execution of scripts or commands at specified intervals.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.