0
0
Linux CLIscripting~10 mins

Why cron automates recurring tasks in Linux CLI - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to schedule a task every minute using cron syntax.

Linux CLI
* * * * * [1]
Drag options to blanks, or click blank then click option'
Adate
Becho Hello
Cls -l
D/usr/bin/python3 script.py
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the command before the time fields
Using incomplete command paths
2fill in blank
medium

Complete the cron schedule to run a task every day at 3 AM.

Linux CLI
[1] 3 * * * /usr/bin/backup.sh
Drag options to blanks, or click blank then click option'
A0
B3
C30
D15
Attempts:
3 left
💡 Hint
Common Mistakes
Using 3 in the minutes field instead of 0
Confusing hours and minutes fields
3fill in blank
hard

Fix the error in this cron line to run a script every Monday at 5 PM.

Linux CLI
0 17 * * [1] /home/user/script.sh
Drag options to blanks, or click blank then click option'
A0
B7
C1
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 or 7 for Monday
Using 5 which is Friday
4fill in blank
hard

Fill both blanks to run a command every 15 minutes on weekdays.

Linux CLI
[1] */15 * * [2] /usr/bin/cleanup.sh
Drag options to blanks, or click blank then click option'
A*/15
B1-5
C0-6
D6,7
Attempts:
3 left
💡 Hint
Common Mistakes
Using '0-6' which includes Sunday
Using '6,7' which is weekend
5fill in blank
hard

Fill all three blanks to create a cron job that runs at 2:30 AM on the 1st of every month.

Linux CLI
[1] [2] [3] * * /usr/bin/monthly_report.sh
Drag options to blanks, or click blank then click option'
A30
B2
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping hour and minute fields
Using 0 for day of month which is invalid