Linux CLI - Cron and SchedulingYou want to run a script every 15 minutes between 9 AM and 5 PM on weekdays. Which crontab entry achieves this?A*/15 9-17 * * 1-5 /path/to/script.shB15 */9-17 * * 1-5 /path/to/script.shC0 9-17/15 * * 1-5 /path/to/script.shD*/15 9-17 * * 6,7 /path/to/script.shCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand timing requirementsEvery 15 minutes means minute field = */15; hours 9 to 17 means 9-17; weekdays are 1-5.Step 2: Match with options*/15 9-17 * * 1-5 /path/to/script.sh correctly uses these fields and runs the script.Final Answer:*/15 9-17 * * 1-5 /path/to/script.sh -> Option AQuick Check:Minute */15, hour 9-17, day 1-5 = correct [OK]Quick Trick: Use */15 for every 15 minutes, 1-5 for weekdays [OK]Common Mistakes:Swapping hour and minute fieldsUsing weekend days instead of weekdaysIncorrect step syntax in hour field
Master "Cron and Scheduling" in Linux CLI9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Linux CLI Quizzes Cron and Scheduling - Common cron expressions - Quiz 5medium Cron and Scheduling - Cron log monitoring - Quiz 13medium Cron and Scheduling - at command for one-time jobs - Quiz 2easy Environment and Configuration - History command and search - Quiz 10hard Package Management - Installing, updating, removing packages - Quiz 7medium Package Management - Building from source basics - Quiz 4medium SSH and Remote Access - Why SSH enables secure remote management - Quiz 2easy SSH and Remote Access - Why SSH enables secure remote management - Quiz 3easy System Administration - System resource monitoring (free, uptime, vmstat) - Quiz 10hard System Administration - journalctl for systemd logs - Quiz 10hard