Bird
0
0

Why does the crontab entry 0 0 * * 0,7 /script.sh potentially cause confusion?

hard📝 Conceptual Q10 of 15
Linux CLI - Cron and Scheduling
Why does the crontab entry 0 0 * * 0,7 /script.sh potentially cause confusion?
ABecause 0 means Monday and 7 means Sunday
BBecause both 0 and 7 represent Sunday, causing duplicate runs
CBecause day of week cannot be a list
DBecause 0 and 7 are invalid day of week values
Step-by-Step Solution
Solution:
  1. Step 1: Understand day of week numbering

    In crontab, both 0 and 7 represent Sunday.
  2. Step 2: Analyze effect of listing both

    Listing 0 and 7 causes the job to run twice on Sunday.
  3. Final Answer:

    Because both 0 and 7 represent Sunday, causing duplicate runs -> Option B
  4. Quick Check:

    0 and 7 both mean Sunday, avoid duplicates [OK]
Quick Trick: 0 and 7 both mean Sunday; use only one [OK]
Common Mistakes:
  • Thinking 7 is invalid
  • Assuming 0 means Monday
  • Not realizing duplicate runs happen

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes