0
0
Linux CLIscripting~10 mins

Common cron expressions 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*
B0
C1
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using '0' in the last field runs only on Sunday.
Using '1' or '5' restricts the job to specific weekdays.
2fill in blank
medium

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

Linux CLI
0 [1] * * * /path/to/script.sh
Drag options to blanks, or click blank then click option'
A0
B23
C3
D12
Attempts:
3 left
💡 Hint
Common Mistakes
Setting hour to 0 runs at midnight, not 3 AM.
Using 12 runs at noon, not 3 AM.
3fill in blank
hard

Fix the error in the cron expression to run a job every Sunday at midnight.

Linux CLI
0 0 * * [1] /path/to/script.sh
Drag options to blanks, or click blank then click option'
A*
B7
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' runs the job every day, not just Sunday.
Using '1' runs the job on Monday.
4fill in blank
hard

Fill both blanks to schedule a job to run every 15 minutes between 9 AM and 5 PM on weekdays.

Linux CLI
[1] 9-17 * * [2] /path/to/script.sh
Drag options to blanks, or click blank then click option'
A*/15
B0
C1-5
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' in minutes runs every minute, not every 15 minutes.
Using '0' in day of week runs only on Sunday.
5fill in blank
hard

Fill all three blanks to schedule a job to run at 30 minutes past every hour from 8 AM to 10 AM on the 1st and 15th of each month.

Linux CLI
[1] [2] 1,15 * [3] /path/to/script.sh
Drag options to blanks, or click blank then click option'
A30
B8-10
C*
D1-5
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' in hours runs every hour, not just 8 to 10.
Using '1-5' in day of week restricts to weekdays, which is not needed here.