Bird
0
0

What does the cron expression 0 0 * * * do?

easy📝 Conceptual Q11 of 15
Linux CLI - Cron and Scheduling
What does the cron expression 0 0 * * * do?
ARuns a task every minute
BRuns a task every hour
CRuns a task every day at midnight
DRuns a task every Sunday at midnight
Step-by-Step Solution
Solution:
  1. Step 1: Understand the cron fields

    The expression has five fields: minute=0, hour=0, day=*, month=*, weekday=*. This means minute 0, hour 0, every day, every month, every weekday.
  2. Step 2: Interpret the schedule

    Since minute and hour are fixed at 0, and others are '*', the task runs once daily at 00:00 (midnight).
  3. Final Answer:

    Runs a task every day at midnight -> Option C
  4. Quick Check:

    0 0 * * * = daily at midnight [OK]
Quick Trick: Minute and hour 0 means daily at midnight [OK]
Common Mistakes:
  • Thinking * means no schedule
  • Confusing hour and minute fields
  • Assuming it runs every minute

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes