Bird
0
0

Why does this cron job fail to run? 0 25 * * * /usr/bin/script.sh

medium📝 Debug Q7 of 15
Linux CLI - Cron and Scheduling
Why does this cron job fail to run? 0 25 * * * /usr/bin/script.sh
AHour field 25 is invalid; valid range is 0-23
BMinute field 0 is invalid; must be 1-59
CCommand path must not contain /usr/bin/
DCron jobs cannot run scripts with .sh extension
Step-by-Step Solution
Solution:
  1. Step 1: Validate the hour field

    Hour must be between 0 and 23; 25 is invalid.
  2. Step 2: Check other fields

    Minute 0 is valid, command path is valid, script extension allowed.
  3. Final Answer:

    Hour field 25 is invalid; valid range is 0-23 -> Option A
  4. Quick Check:

    Hour range 0-23 only [OK]
Quick Trick: Hour must be 0-23; 25 causes failure [OK]
Common Mistakes:
  • Using invalid hour values
  • Thinking minute 0 is invalid
  • Believing script extension blocks execution

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes