Bird
0
0

Why does the cron expression 0 0 * * 1 run only once a week?

hard📝 Conceptual Q10 of 15
Linux CLI - Cron and Scheduling
Why does the cron expression 0 0 * * 1 run only once a week?
ABecause hour and minute are zero, limiting runs to midnight
BBecause day of week is set to 1, which means Monday only
CBecause day of month is *, so it runs daily
DBecause month is *, so it runs every month
Step-by-Step Solution
Solution:
  1. Step 1: Analyze day of week field

    Day of week=1 means Monday only.
  2. Step 2: Understand hour and minute

    Hour=0 and minute=0 means midnight time.
  3. Step 3: Explain frequency

    Since day of week restricts to Monday, job runs once per week at midnight.
  4. Final Answer:

    Because day of week is set to 1, which means Monday only -> Option B
  5. Quick Check:

    Day of week limits frequency to once weekly [OK]
Quick Trick: Day of week field controls weekly frequency [OK]
Common Mistakes:
  • Thinking it runs daily
  • Ignoring day of week field
  • Confusing day of month and day of week

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes