0
0
Linux CLIscripting~10 mins

crontab syntax in Linux CLI - Interactive Code Practice

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

Complete the code to schedule a job to run every minute.

Linux CLI
* * * * [1] /path/to/script.sh
Drag options to blanks, or click blank then click option'
A?
B/
C-
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using '/' or '-' in the day of week field without proper context.
Leaving the field empty.
2fill in blank
medium

Complete the code to schedule a job to run at 3:30 AM every day.

Linux CLI
[1] 3 * * * /path/to/script.sh
Drag options to blanks, or click blank then click option'
A30
B0
C3
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping minutes and hours.
Using '*' instead of specific numbers.
3fill in blank
hard

Fix the error in the crontab line to run a job every 5 minutes.

Linux CLI
*/[1] * * * * /path/to/script.sh
Drag options to blanks, or click blank then click option'
A5
B0
C*/5
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Putting '*/5' inside the blank, which duplicates the '*/' prefix.
Using 0 or 1 which do not mean every 5 minutes.
4fill in blank
hard

Fill both blanks to schedule a job to run at 2:15 PM on weekdays (Monday to Friday).

Linux CLI
15 [1] * * [2] /path/to/script.sh
Drag options to blanks, or click blank then click option'
A14
B13
C1-5
D0-6
Attempts:
3 left
💡 Hint
Common Mistakes
Using 2 instead of 14 for hour.
Using 0-6 for weekdays instead of 1-5.
5fill in blank
hard

Fill all three blanks to schedule a job to run at 11:45 PM on the 1st day of every month in January, March, and May.

Linux CLI
[1] [2] [3] 1,3,5 * /path/to/script.sh
Drag options to blanks, or click blank then click option'
A45
B23
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 11 instead of 23 for hour.
Using 0 for day of month instead of 1.