Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to open the crontab editor for the current user.
Linux CLI
crontab [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-l' which lists the crontab instead of editing it.
Using '-r' which removes the crontab instead of editing.
✗ Incorrect
The '-e' option opens the crontab editor for the current user.
2fill in blank
mediumComplete the crontab line to run a script every day at 5 AM.
Linux CLI
[1] 5 * * * /home/user/script.sh
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting 5 in the minutes field instead of the hour field.
Using 30 or 15 which run at 5:15 or 5:30 instead of 5:00.
✗ Incorrect
The first field is minutes, so '0' means at minute zero of the hour (5:00 AM).
3fill in blank
hardFix the error in this crontab line to run a backup script every Sunday at midnight.
Linux CLI
0 0 * * [1] /usr/local/bin/backup.sh
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 7 which may not be supported on all systems.
Using 0 which can mean Sunday but is less readable.
✗ Incorrect
The day of week field can be 'sun' to represent Sunday, which is clearer and valid.
4fill in blank
hardFill both blanks to run a cleanup script every 15 minutes.
Linux CLI
*/[1] * * * [2] /home/user/cleanup.sh
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*/15' in the hour field which is invalid.
Using '*' in the minutes field which runs every minute.
✗ Incorrect
The minutes field uses '*/15' for every 15 minutes, so '15' is correct for the first blank and '*' for the day-of-week field means every day of the week.
5fill in blank
hardFill all three blanks to run a script at 2:30 PM on the first day of every month.
Linux CLI
[1] [2] [3] * * /home/user/monthly_report.sh
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 2 instead of 14 for the hour field.
Using 0 for the day of month which is invalid.
✗ Incorrect
The minutes field is 30, hour is 14 (2 PM in 24-hour format), and day of month is 1 for the first day.