0
0
Linux CLIscripting~20 mins

Common cron expressions in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cron Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the output of this cron expression schedule?
Given the cron expression 0 0 * * 0, what does it schedule?
ARuns the job every Sunday at midnight
BRuns the job every day at midnight
CRuns the job every hour on Sundays
DRuns the job every Sunday at noon
Attempts:
2 left
💡 Hint
Remember the fields: minute, hour, day of month, month, day of week.
💻 Command Output
intermediate
2:00remaining
What does this cron expression do?
What is the schedule for the cron expression */15 9-17 * * 1-5?
ARuns every 15 minutes from 9 AM to 5 PM on weekends
BRuns every 15 minutes all day on weekdays
CRuns every 15 minutes from 9 AM to 5 PM, Monday to Friday
DRuns every 15 minutes from 9 AM to 5 PM every day
Attempts:
2 left
💡 Hint
Look at the hour and day of week fields carefully.
💻 Command Output
advanced
2:00remaining
What is the output of this cron expression?
What schedule does the cron expression 30 23 1 * * represent?
ARuns at 11:30 PM on the first day of every month
BRuns at 11:30 AM on the first day of every month
CRuns at 11:30 PM every day
DRuns at 11:30 PM on the first Monday of every month
Attempts:
2 left
💡 Hint
Check the day of month and hour fields.
💻 Command Output
advanced
2:00remaining
What error or output does this cron expression produce?
What happens if you use the cron expression 60 24 * * *?
ARuns at midnight every day
BRuns at 24:00 every day (valid time)
CRuns at 00:00 on the 60th day of the month
DIt causes an error because 60 is invalid for minutes
Attempts:
2 left
💡 Hint
Minutes range from 0 to 59, hours from 0 to 23.
🧠 Conceptual
expert
2:00remaining
How many times does this cron expression run in a week?
How many times will the job run with the cron expression 0 12 */2 * 1 in one week?
A4 times
B3 times
C1 time
D0 times
Attempts:
2 left
💡 Hint
Cron uses OR logic for day of month and day of week fields interaction.