CKAD Application Design and Build Practice Question
Which of the following is a valid schedule for a CronJob that runs every day at midnight?
⚠ Common exam trap
A common trap is the subtle difference between '0 0 * * *' (every day at midnight) and '0 0 1 * *' (first day of the month at midnight), exploiting the confusion that the third field is day of month, not 'every day'.
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
✓
0 0 * * *
A CronJob schedule uses standard cron syntax: minute, hour, day of month, month, day of week. '0 0 * * *' means minute=0, hour=0 (midnight), and the asterisks for day of month, month, and day of week match any value, so the job runs every day at midnight.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
0 0 1 * *
Why it's wrong here
The day-of-month field is 1, so this runs at midnight only on the first day of each month. It is tempting because the minute and hour fields are both 0, matching midnight, but the daily requirement needs an asterisk in day-of-month.
- ✗
* * * * *
Why it's wrong here
Every field is an asterisk, so the job runs every minute of every hour rather than once at midnight. It is tempting as the simplest-looking schedule, but midnight requires minute 0 and hour 0 with asterisks in the remaining fields.
- ✗
0 * * * *
Why it's wrong here
The hour field contains an asterisk, so the job fires at minute zero of every hour, not once daily. It is tempting because the leading 0 fixes the minute, which is correct, but midnight requires the hour field to be 0 as well.
- ✓
0 0 * * *
Why this is correct
The five-field cron format is minute, hour, day-of-month, month, day-of-week. All zeros in the first two fields mean minute zero of hour zero, i.e. midnight daily, while the asterisks leave every day and month unrestricted.
About these practice questions
This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF 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 CKAD exam.