Bird
0
0

How would you schedule a cron job to run every 15 minutes only between 8 AM and 10 AM daily?

hard📝 Application Q9 of 15
Linux CLI - Cron and Scheduling
How would you schedule a cron job to run every 15 minutes only between 8 AM and 10 AM daily?
A0 8-10/15 * * * /usr/bin/fifteen_min_task.sh
B15 */8-10 * * * /usr/bin/fifteen_min_task.sh
C*/15 8-10 * * * /usr/bin/fifteen_min_task.sh
D*/15 * 8-10 * * /usr/bin/fifteen_min_task.sh
Step-by-Step Solution
Solution:
  1. Step 1: Understand minute and hour fields

    */15 in minute means every 15 minutes; 8-10 in hour means hours 8,9,10.
  2. Step 2: Verify the schedule matches requirement

    */15 8-10 * * * /usr/bin/fifteen_min_task.sh runs every 15 minutes during hours 8, 9, and 10 daily.
  3. Final Answer:

    */15 8-10 * * * /usr/bin/fifteen_min_task.sh -> Option C
  4. Quick Check:

    Minute '*/15' and hour '8-10' for correct timing [OK]
Quick Trick: Use '*/15' for every 15 minutes and hour range for time window [OK]
Common Mistakes:
  • Placing '*/15' in hour field
  • Misusing slash in hour field
  • Confusing day and hour fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes