Bird
0
0

You want to run a backup script every weekday at 11:45 PM. Which cron expression should you use?

hard📝 Application Q8 of 15
Linux CLI - Cron and Scheduling
You want to run a backup script every weekday at 11:45 PM. Which cron expression should you use?
A45 11 * * 1-5
B23 45 * * 1-5
C45 23 * * 1-5
D45 23 * * 6,7
Step-by-Step Solution
Solution:
  1. Step 1: Identify time fields

    11:45 PM means hour=23, minute=45.
  2. Step 2: Identify days

    Weekdays are Monday to Friday, day of week=1-5.
  3. Step 3: Match expression

    Minute=45, hour=23, day of week=1-5, others are *.
  4. Final Answer:

    45 23 * * 1-5 -> Option C
  5. Quick Check:

    Hour 23 and minute 45 with weekdays 1-5 [OK]
Quick Trick: Hour is 24-hour format; 11 PM is 23 [OK]
Common Mistakes:
  • Swapping hour and minute
  • Using weekend days instead of weekdays
  • Using 11 instead of 23 for hour

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes