0
0
Raspberry Piprogramming~10 mins

Scheduled data collection with cron in Raspberry Pi - 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 script to run every minute using cron syntax.

Raspberry Pi
* * * * [1] /home/pi/data_collect.sh
Drag options to blanks, or click blank then click option'
A*
B1
C0
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number instead of * causes the job to run only on that specific day.
2fill in blank
medium

Complete the cron schedule to run a script every hour at minute 30.

Raspberry Pi
30 [1] * * * /home/pi/data_collect.sh
Drag options to blanks, or click blank then click option'
A0
B1
C*
D30
Attempts:
3 left
💡 Hint
Common Mistakes
Putting 30 in the hour field causes the script to run only at 30:00 which is invalid.
3fill in blank
hard

Fix the error in the cron command to run a script every day at 6 AM.

Raspberry Pi
[1] 6 * * * /home/pi/data_collect.sh
Drag options to blanks, or click blank then click option'
A6
B30
C*
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting minutes to 6 causes the script to run at 6 minutes past every hour.
4fill in blank
hard

Fill both blanks to schedule a script to run every Monday at 7 AM.

Raspberry Pi
0 [1] * * [2] /home/pi/data_collect.sh
Drag options to blanks, or click blank then click option'
A7
B1
C0
D6
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 for day of week runs on Sunday, not Monday.
5fill in blank
hard

Fill all three blanks to schedule a script to run at 5:15 PM on the 10th day of every month.

Raspberry Pi
[1] [2] [3] * * /home/pi/data_collect.sh
Drag options to blanks, or click blank then click option'
A15
B17
C10
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using 5 for hour runs at 5 AM, not 5 PM.