Bird
0
0

You want to run a script every weekday at 9:00 AM using crontab -e. Which line correctly schedules this?

hard📝 Application Q8 of 15
Linux CLI - Cron and Scheduling
You want to run a script every weekday at 9:00 AM using crontab -e. Which line correctly schedules this?
A0 9 * * 1-5 /home/user/script.sh
B0 9 * * 0-6 /home/user/script.sh
C0 9 * * 6,0 /home/user/script.sh
D0 9 * * 7 /home/user/script.sh
Step-by-Step Solution
Solution:
  1. Step 1: Identify weekday range

    Weekdays are Monday (1) through Friday (5).
  2. Step 2: Set time and days correctly

    Minute 0, hour 9, days 1-5 schedules job at 9:00 AM on weekdays.
  3. Final Answer:

    0 9 * * 1-5 /home/user/script.sh -> Option A
  4. Quick Check:

    Weekdays = 1-5 in day of week field [OK]
Quick Trick: Use 1-5 for Monday to Friday in day of week field [OK]
Common Mistakes:
  • Using 0-6 includes weekends
  • Using 6,0 schedules weekends only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes